ruff
ee3e0877 - [`ruff`] Remove `lint.external` hint for Ruff-specific suppressions (`RUF102`) (#27923)

Commit
38 days ago
[`ruff`] Remove `lint.external` hint for Ruff-specific suppressions (`RUF102`) (#27923) ## Summary Remove the "Add non-Ruff rule codes to the `lint.external` configuration option" help message from the suppression path (RUF102/RUF104). The `# ruff: ignore` directive is a Ruff-specific suppression mechanism. When a user writes an unknown code in a `# ruff: ignore` directive, it is typically a typo or a rule name with preview disabled — not a non-Ruff rule code. The help message suggesting to add the code to `lint.external` is therefore misleading in this context. The noqa path (RUF102) still handles this tip for `# noqa` directives, which is the appropriate context for external rule codes. Closes #27880. ## Changes 1. **suppression.rs**: Removed the `has_unknown_code` field from `SuppressionDiagnostic` and the help message that was emitted when it was set. 2. **ignore.md**: Removed the "Add non-Ruff rule codes" help lines from suppression test snapshots. 3. **range_suppressions.snap**: Updated snapshot to reflect the removal of the help message.
Author
Parents
Loading