pub struct FindingIgnoreMatcher { /* private fields */ }Expand description
Compiled project-relative patterns for hiding source-owned findings.
Positive patterns select paths to hide. Negated patterns (prefixed with
!) select report exceptions. When every pattern is negated, all paths
outside those exceptions are hidden, matching Knip’s ignore semantics.
Implementations§
Source§impl FindingIgnoreMatcher
impl FindingIgnoreMatcher
Sourcepub fn is_ignored(&self, path: &str) -> bool
pub fn is_ignored(&self, path: &str) -> bool
Whether a normalized project-root-relative source path is hidden.
Sourcepub fn reset_usage(&self)
pub fn reset_usage(&self)
Forget the pattern hits of an earlier analysis pass.
A long-lived process (watch mode, the LSP, an engine session) keeps one resolved config for many passes. Each dead-code pass calls this first, so a pattern that matched in an earlier pass is reported again when its findings are gone.
Sourcepub fn unmatched_patterns(&self) -> Vec<&str>
pub fn unmatched_patterns(&self) -> Vec<&str>
Configured patterns that matched no candidate finding path, in config order.
Empty when nothing was configured or when the matcher was never consulted, because a run without candidate paths says nothing about whether a pattern is a typo.