pub struct RuleFilter { /* private fields */ }Expand description
Filter for applying rule disable/enable and severity overrides.
Implementations§
Source§impl RuleFilter
impl RuleFilter
Sourcepub fn from_config(config: &RulesConfig) -> Self
pub fn from_config(config: &RulesConfig) -> Self
Create a rule filter from a RulesConfig.
Sourcepub fn merge_language_config(&mut self, lang_rules: Option<&RulesConfig>)
pub fn merge_language_config(&mut self, lang_rules: Option<&RulesConfig>)
Merge language-specific rules config.
Sourcepub fn is_disabled(&self, code: &str) -> bool
pub fn is_disabled(&self, code: &str) -> bool
Check if a rule code is disabled.
Sourcepub fn get_severity_override(&self, code: &str) -> Option<SeverityOverride>
pub fn get_severity_override(&self, code: &str) -> Option<SeverityOverride>
Get the severity override for a rule code, if any.
Sourcepub fn filter_issues(&self, issues: Vec<LintIssue>) -> Vec<LintIssue>
pub fn filter_issues(&self, issues: Vec<LintIssue>) -> Vec<LintIssue>
Filter a list of issues, removing disabled rules and applying severity overrides.
Sourcepub fn stats(&self) -> FilterStats
pub fn stats(&self) -> FilterStats
Get statistics about the filter configuration.
Trait Implementations§
Source§impl Clone for RuleFilter
impl Clone for RuleFilter
Source§fn clone(&self) -> RuleFilter
fn clone(&self) -> RuleFilter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RuleFilter
impl Debug for RuleFilter
Auto Trait Implementations§
impl Freeze for RuleFilter
impl RefUnwindSafe for RuleFilter
impl Send for RuleFilter
impl Sync for RuleFilter
impl Unpin for RuleFilter
impl UnsafeUnpin for RuleFilter
impl UnwindSafe for RuleFilter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more