pub struct LintConfig {
pub disabled_rules: HashSet<String>,
pub severity_overrides: HashMap<String, Severity>,
}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).
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.
Trait Implementations§
Source§impl Clone for LintConfig
impl Clone for LintConfig
Source§fn clone(&self) -> LintConfig
fn clone(&self) -> LintConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LintConfig
impl Debug for LintConfig
Source§impl Default for LintConfig
impl Default for LintConfig
Source§fn default() -> LintConfig
fn default() -> LintConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LintConfig
impl RefUnwindSafe for LintConfig
impl Send for LintConfig
impl Sync for LintConfig
impl Unpin for LintConfig
impl UnsafeUnpin for LintConfig
impl UnwindSafe for LintConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more