ruff/docs
Loïc Riegel 7a75702237 Ignore deprecated rules unless selected by exact code (#20167)
<!--
Thank you for contributing to Ruff/ty! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title? (Please prefix
with `[ty]` for ty pull
  requests.)
- Does this pull request include references to any relevant issues?
-->

## Summary

Closes #18349

After this change:
- All deprecated rules are deselected by default
- They are only selected if the user specifically selects them by code,
e.g. `--select UP038`
- Thus, `--select ALL --select UP --select UP0` won't select the
deprecated rule UP038
- Documented the change in version policy. From now on, deprecating a
rule should increase the minor version

## Test Plan

Integration tests in "integration_tests.rs"

Also tested with a temporary test package:
```
~> ../../ruff/target/debug/ruff.exe check --select UP038
warning: Rule `UP038` is deprecated and will be removed in a future release.
warning: Detected debug build without --no-cache.
UP038 Use `X | Y` in `isinstance` call instead of `(X, Y)`
 --> main.py:2:11
  |
1 | def main():
2 |     print(isinstance(25, (str, int)))
  |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
help: Convert to `X | Y`

Found 1 error.
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).

~> ../../ruff/target/debug/ruff.exe check --select UP03
warning: Detected debug build without --no-cache.
All checks passed!

~> ../../ruff/target/debug/ruff.exe check --select UP0
warning: Detected debug build without --no-cache.
All checks passed!

~> ../../ruff/target/debug/ruff.exe check --select UP
warning: Detected debug build without --no-cache.
All checks passed!

~> ../../ruff/target/debug/ruff.exe check --select ALL
# warnings and errors, but because of other errors, UP038 was deselected
```
2025-09-10 09:00:27 -04:00
..
.overrides Use | for page separator in meta titles (#13221) 2024-09-03 00:46:15 +00:00
assets Point docs to Astral favicon (#13219) 2024-09-02 20:11:39 -04:00
editors Add support for using uv as an alternative formatter backend (#19665) 2025-09-09 20:39:53 +05:30
formatter Update black deviations (#15928) 2025-02-04 14:04:24 +00:00
js Improvements to documentation (#12712) 2024-08-12 07:17:32 +00:00
stylesheets Fix copy and line separator colors in dark mode (#19630) 2025-07-30 15:08:31 +01:00
.gitignore Add docs for Ruff language server (#12344) 2024-07-18 17:41:43 +05:30
configuration.md Fix description of global config file discovery strategy (#19143) (#19188) 2025-08-17 18:35:37 -05:00
faq.md Stabilize new strategy for classifying imports as first party (#20268) 2025-09-10 09:00:27 -04:00
formatter.md [docs] fix formatting of "See Style Guide" link (#17272) 2025-04-07 12:43:26 +00:00
installation.md Use uv consistently throughout the documentation (#15302) 2025-01-07 14:43:25 +00:00
integrations.md Bump 0.12.12 (#20242) 2025-09-04 11:35:56 -05:00
linter.md Add new `noqa` specification to the docs (#16703) 2025-03-13 12:48:53 -04:00
preview.md Fix minor punctuation errors (#16228) 2025-02-18 12:24:57 +00:00
requirements-insiders.txt Update dependency ruff to v0.12.12 (#20293) 2025-09-08 11:03:19 +05:30
requirements.txt Update dependency ruff to v0.12.12 (#20293) 2025-09-08 11:03:19 +05:30
tutorial.md Bump 0.12.12 (#20242) 2025-09-04 11:35:56 -05:00
versioning.md Ignore deprecated rules unless selected by exact code (#20167) 2025-09-10 09:00:27 -04:00