pub struct LintConfig {
pub disabled_rules: HashSet<String>,
pub severity_overrides: HashMap<String, Severity>,
pub exclude_patterns: Vec<String>,
}Expand description
Configuration for lint rule suppression and severity overrides.
Can be loaded from a .rsigma-lint.yml config file, merged with CLI
--disable flags, and combined with inline # rsigma-disable comments.
Fields§
§disabled_rules: HashSet<String>Rule names to suppress entirely (e.g. "missing_description").
severity_overrides: HashMap<String, Severity>Override the default severity of a rule (e.g. title_too_long -> Info).
exclude_patterns: Vec<String>Glob patterns for paths to exclude from directory linting.
Matched against relative paths from the lint root (e.g. "config/**").
Implementations§
Source§impl LintConfig
impl LintConfig
Sourcepub fn find_in_ancestors(start_path: &Path) -> Option<PathBuf>
pub fn find_in_ancestors(start_path: &Path) -> Option<PathBuf>
Walk up from start_path to find the nearest .rsigma-lint.yml.
Checks start_path itself (if a directory) or its parent, then
ancestors until the filesystem root.
Sourcepub fn merge(&mut self, other: &LintConfig)
pub fn merge(&mut self, other: &LintConfig)
Merge another config into this one (e.g. CLI --disable into file config).
Sourcepub fn is_disabled(&self, rule: &LintRule) -> bool
pub fn is_disabled(&self, rule: &LintRule) -> bool
Check if a rule is disabled.
Sourcepub fn build_exclude_set(&self) -> Option<GlobSet>
pub fn build_exclude_set(&self) -> Option<GlobSet>
Build a compiled globset::GlobSet from the exclude patterns.
Returns None if there are no patterns. Invalid patterns are silently
skipped (they will have been validated at config load time in practice).
Trait Implementations§
Source§impl Clone for LintConfig
impl Clone for LintConfig
Source§fn clone(&self) -> LintConfig
fn clone(&self) -> LintConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more