Expand description
Inline suppression directive parsing.
This module provides support for inline suppression directives that allow developers to suppress specific rule matches on a line-by-line basis.
§Supported Formats
diffguard: ignore <rule_id>- suppresses the match on the same linediffguard: ignore-next-line <rule_id>- suppresses matches on the next linediffguard: ignore *ordiffguard: ignore-all- suppresses all rules on the line
Multiple rules can be specified by separating with commas:
diffguard: ignore rule1, rule2
§Example
ⓘ
let x = y.unwrap(); // diffguard: ignore rust.no_unwrap
// diffguard: ignore-next-line rust.no_dbg
dbg!(value);Structs§
- Effective
Suppressions - The effective suppressions for a single line.
- Suppression
- A parsed suppression directive.
- Suppression
Tracker - Tracks suppression state for a file being processed.
Enums§
- Suppression
Kind - Represents the type of suppression directive found.
Functions§
- parse_
suppression - Parse a line for suppression directives.
- parse_
suppression_ in_ comments - Parse a line for suppression directives, but only if the directive occurs inside a masked comment span.