Ignorelint::FormatLinter
The mixin interface for format-specific lint rules.
Every supported ignore format has a struct that include FormatLinter
and implements two methods:
check_pattern: inspect a single pattern and return issuescheck_patterns: inspect the full pattern list for cross-pattern issues
The mixin also provides a default build_glob implementation for
filesystem dead-rule detection. Dockerignore overrides this because
it strips slashes before matching.
Instance methods
Build a filesystem glob for dead-rule detection, accounting for format-specific matching semantics (e.g., dockerignore strips slashes).
Rooted patterns get a direct path; unrooted patterns get a **/ prefix
because in gitignore semantics they match at any depth.
Check a single pattern for format-specific issues.
Returns an array of Issue values (empty if the pattern is clean for
this format). Called once per active (non-blank, non-comment) pattern.
Check the full pattern list for cross-pattern issues.
Used for conflict detection (e.g. "build" followed by "!build").
Mutates the issues array in place for efficiency.