pub struct IgnoreTracker { /* private fields */ }Expand description
Tracks ignored rules per line
Implementations§
Source§impl IgnoreTracker
impl IgnoreTracker
Sourcepub fn is_ignored(&self, rule: &str, line: usize) -> bool
pub fn is_ignored(&self, rule: &str, line: usize) -> bool
Check if a rule is ignored on a specific line
Sourcepub fn from_content(content: &str) -> (Self, Vec<IgnoreWarning>)
pub fn from_content(content: &str) -> (Self, Vec<IgnoreWarning>)
Build an ignore tracker from content, returning any warnings
Sourcepub fn from_content_with_rules(
content: &str,
valid_rules: Option<&HashSet<String>>,
) -> (Self, Vec<IgnoreWarning>)
pub fn from_content_with_rules( content: &str, valid_rules: Option<&HashSet<String>>, ) -> (Self, Vec<IgnoreWarning>)
Build an ignore tracker from content with optional rule name validation
Sourcepub fn unused_warnings(&self) -> Vec<IgnoreWarning>
pub fn unused_warnings(&self) -> Vec<IgnoreWarning>
Get warnings for unused ignore directives
Trait Implementations§
Source§impl Debug for IgnoreTracker
impl Debug for IgnoreTracker
Source§impl Default for IgnoreTracker
impl Default for IgnoreTracker
Source§fn default() -> IgnoreTracker
fn default() -> IgnoreTracker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IgnoreTracker
impl RefUnwindSafe for IgnoreTracker
impl Send for IgnoreTracker
impl Sync for IgnoreTracker
impl Unpin for IgnoreTracker
impl UnwindSafe for IgnoreTracker
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