mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:39:12 +00:00
[red-knot] Add --ignore
, --warn
, and --error
CLI arguments (#15689)
This commit is contained in:
parent
ab2e1905c4
commit
4e3982cf95
9 changed files with 396 additions and 83 deletions
|
@ -94,6 +94,10 @@ impl DiagnosticId {
|
|||
matches!(self, DiagnosticId::Lint(self_name) if self_name == name)
|
||||
}
|
||||
|
||||
pub fn strip_category(code: &str) -> Option<&str> {
|
||||
code.split_once(':').map(|(_, rest)| rest)
|
||||
}
|
||||
|
||||
/// Returns `true` if this `DiagnosticId` matches the given name.
|
||||
///
|
||||
/// ## Examples
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue