EditorConfig section glob compiler and matcher.
Summary
Functions
Compiles an EditorConfig section glob.
Checks whether a path matches an EditorConfig section glob.
Functions
@spec compile(String.t()) :: {:ok, EditorConfig.Glob.Compiled.t()} | {:error, term()}
Compiles an EditorConfig section glob.
Examples
iex> {:ok, compiled} = EditorConfig.Glob.compile("*.ex")
iex> compiled.pattern
"*.ex"
Checks whether a path matches an EditorConfig section glob.
Examples
iex> EditorConfig.Glob.match?("lib/*.ex", "/project/lib/file.ex", "/project")
true