Skip to content

Conversation

@amyreese
Copy link
Member

@amyreese amyreese commented Dec 10, 2025

  • Define rule codes RUF103/104 for invalid/unmatched suppression comments
  • Report RUF104 unmatched suppression diagnostics

Summary

  • Adds new RUF103 and RUF104 diagnostics for invalid and unmatched suppression comments
  • Reports RUF104 diagnostics for any unmatched suppression comment

Test Plan

Updated snapshots from test cases with unmatched suppression comments

Issue #3711
Fixes #21878
Fixes #21875

@amyreese amyreese force-pushed the amy/unmatched-suppressions branch from 282450e to 7e9def9 Compare December 10, 2025 23:29
@astral-sh-bot
Copy link

astral-sh-bot bot commented Dec 10, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@amyreese amyreese changed the title Report diagnostics for unmatched range suppression comments Report diagnostics for invalid/unmatched range suppression comments Dec 11, 2025
@MichaReiser
Copy link
Member

Uff, ruff: isort 😆

amyreese added a commit that referenced this pull request Dec 11, 2025
## Summary

Ignores `#ruff:isort` when parsing suppressions similar to `#ruff:noqa`.
Should clear up ecosystem issues in #21908

## Test Plan

cargo tests
@amyreese amyreese force-pushed the amy/unmatched-suppressions branch from 100ed3f to 999a481 Compare December 12, 2025 01:25
@amyreese amyreese marked this pull request as ready for review December 12, 2025 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Report unmatched range suppression comments Report invalid range suppressions and parse errors

3 participants