Gitignore.Stack (Gitignore v0.1.0)

Copy Markdown View Source

Stack of directory-scoped gitignore matchers.

A stack models nested .gitignore files where deeper files have stronger priority than shallower files.

Summary

Types

t()

@type t() :: %Gitignore.Stack{casefold?: boolean(), matchers: [Gitignore.Matcher.t()]}

Functions

check(stack, path, opts)

@spec check(t(), binary(), keyword()) ::
  {:ignored | :unignored, Gitignore.Rule.t()} | :not_ignored

ignored?(stack, path, opts)

@spec ignored?(t(), binary(), keyword()) :: boolean()

new(opts \\ [])

@spec new(keyword()) :: t()

push(stack, base, matcher)

@spec push(t(), binary(), [Gitignore.Rule.t()] | Gitignore.Matcher.t()) :: t()