new module for parsing ranged suppressions (#21441)

This adds a new `suppression` module to the `ruff_linter` crate, similar
to the suppression
module for ty, to parse comments for ruff suppression directives, such
as `# ruff: disable[CODE]`.
This commit is contained in:
Amethyst Reese 2025-12-02 15:39:59 -08:00 committed by GitHub
parent 7b0aab1696
commit abaa49f552
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1534 additions and 0 deletions

1
Cargo.lock generated
View File

@ -3124,6 +3124,7 @@ dependencies = [
"bitflags 2.10.0", "bitflags 2.10.0",
"clap", "clap",
"colored 3.0.0", "colored 3.0.0",
"compact_str",
"fern", "fern",
"glob", "glob",
"globset", "globset",

View File

@ -35,6 +35,7 @@ anyhow = { workspace = true }
bitflags = { workspace = true } bitflags = { workspace = true }
clap = { workspace = true, features = ["derive", "string"], optional = true } clap = { workspace = true, features = ["derive", "string"], optional = true }
colored = { workspace = true } colored = { workspace = true }
compact_str = { workspace = true }
fern = { workspace = true } fern = { workspace = true }
glob = { workspace = true } glob = { workspace = true }
globset = { workspace = true } globset = { workspace = true }

View File

@ -46,6 +46,7 @@ pub mod rule_selector;
pub mod rules; pub mod rules;
pub mod settings; pub mod settings;
pub mod source_kind; pub mod source_kind;
pub mod suppression;
mod text_helpers; mod text_helpers;
pub mod upstream_categories; pub mod upstream_categories;
mod violation; mod violation;

File diff suppressed because it is too large Load Diff