Report diagnostics for invalid/unmatched range suppression comments (#21908)

## Summary

- Adds new RUF103 and RUF104 diagnostics for invalid and unmatched
suppression comments
- Reports RUF100 for any unused range suppression
- Reports RUF102 for range suppression comment with invalid rule codes
- Reports RUF103 for range suppression comment with invalid suppression syntax
- Reports RUF104 diagnostics for any unmatched range suppression comment (disable w/o enable)


## Test Plan

Updated snapshots from test cases with unmatched suppression comments

Issue #3711
Fixes #21878
Fixes #21875
This commit is contained in:
Amethyst Reese
2025-12-18 12:58:58 -08:00
committed by GitHub
parent 2e44a861cb
commit 3d334a313e
12 changed files with 542 additions and 83 deletions

2
ruff.schema.json generated
View File

@@ -4051,6 +4051,8 @@
"RUF100",
"RUF101",
"RUF102",
"RUF103",
"RUF104",
"RUF2",
"RUF20",
"RUF200",