Repository navigation
Commit ef912bb
committed
Add newly stabilized rules to defaults (#27055)
Summary
--
I did a quick pass over the newly stabilized rules to see if any of them
should be on by default, with these results:
| Rule | Category |
|--|--|
| [PLR1708](https://docs.astral.sh/ruff/rules/PLR1708) | correctness |
| [RUF068](https://docs.astral.sh/ruff/rules/RUF068) | correctness |
| [ISC004](https://docs.astral.sh/ruff/rules/ISC004) | suspicious |
| [PLE0304](https://docs.astral.sh/ruff/rules/PLE0304) | suspicious |
| [RUF063](https://docs.astral.sh/ruff/rules/RUF063) | suspicious |
| [FURB192](https://docs.astral.sh/ruff/rules/FURB192) | complexity |
| [AIR303](https://docs.astral.sh/ruff/rules/AIR303) | pedantic |
| [CPY001](https://docs.astral.sh/ruff/rules/CPY001) | pedantic |
| [FURB164](https://docs.astral.sh/ruff/rules/FURB164) | pedantic |
| [LOG004](https://docs.astral.sh/ruff/rules/LOG004) | pedantic |
| [PLR0917](https://docs.astral.sh/ruff/rules/PLR0917) | pedantic |
| [RUF036](https://docs.astral.sh/ruff/rules/RUF036) | pedantic |
| [RUF045](https://docs.astral.sh/ruff/rules/RUF045) | pedantic |
Obviously the categories themselves are still unused for now, but this
suggested adding the first six to the default set. I initially included
RUF036 in Style and RUF045 as Suspicious but Codex talked me down.
LOG004 would also likely be higher if it were a bit more reliable, but
we can't easily detect some cases that are relatively common in the
ecosystem, such as defining some kind of custom logging function that
itself is intended to be called from an exception handler.
Test Plan
--
Updated snapshots1 parent b30f040 commit ef912bb
3 files changed
Lines changed: 24 additions & 0 deletions
File tree
- crates
- ruff_linter/src/settings
- ruff/tests/cli
- snapshots
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4872 | 4872 | | |
4873 | 4873 | | |
4874 | 4874 | | |
| 4875 | + | |
4875 | 4876 | | |
4876 | 4877 | | |
4877 | 4878 | | |
| |||
5035 | 5036 | | |
5036 | 5037 | | |
5037 | 5038 | | |
| 5039 | + | |
5038 | 5040 | | |
5039 | 5041 | | |
5040 | 5042 | | |
| |||
5065 | 5067 | | |
5066 | 5068 | | |
5067 | 5069 | | |
| 5070 | + | |
5068 | 5071 | | |
5069 | 5072 | | |
5070 | 5073 | | |
| |||
5150 | 5153 | | |
5151 | 5154 | | |
5152 | 5155 | | |
| 5156 | + | |
5153 | 5157 | | |
5154 | 5158 | | |
5155 | 5159 | | |
| |||
5181 | 5185 | | |
5182 | 5186 | | |
5183 | 5187 | | |
| 5188 | + | |
| 5189 | + | |
5184 | 5190 | | |
5185 | 5191 | | |
5186 | 5192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
| 325 | + | |
324 | 326 | | |
325 | 327 | | |
326 | 328 | | |
| |||
351 | 353 | | |
352 | 354 | | |
353 | 355 | | |
| 356 | + | |
354 | 357 | | |
355 | 358 | | |
356 | 359 | | |
| |||
436 | 439 | | |
437 | 440 | | |
438 | 441 | | |
| 442 | + | |
439 | 443 | | |
440 | 444 | | |
441 | 445 | | |
| |||
467 | 471 | | |
468 | 472 | | |
469 | 473 | | |
| 474 | + | |
| 475 | + | |
470 | 476 | | |
471 | 477 | | |
472 | 478 | | |
| |||
567 | 573 | | |
568 | 574 | | |
569 | 575 | | |
| 576 | + | |
570 | 577 | | |
571 | 578 | | |
572 | 579 | | |
| |||
730 | 737 | | |
731 | 738 | | |
732 | 739 | | |
| 740 | + | |
733 | 741 | | |
734 | 742 | | |
735 | 743 | | |
| |||
760 | 768 | | |
761 | 769 | | |
762 | 770 | | |
| 771 | + | |
763 | 772 | | |
764 | 773 | | |
765 | 774 | | |
| |||
845 | 854 | | |
846 | 855 | | |
847 | 856 | | |
| 857 | + | |
848 | 858 | | |
849 | 859 | | |
850 | 860 | | |
| |||
876 | 886 | | |
877 | 887 | | |
878 | 888 | | |
| 889 | + | |
| 890 | + | |
879 | 891 | | |
880 | 892 | | |
881 | 893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
490 | 491 | | |
491 | 492 | | |
492 | 493 | | |
| |||
495 | 496 | | |
496 | 497 | | |
497 | 498 | | |
| 499 | + | |
498 | 500 | | |
499 | 501 | | |
500 | 502 | | |
| |||
528 | 530 | | |
529 | 531 | | |
530 | 532 | | |
| 533 | + | |
531 | 534 | | |
532 | 535 | | |
533 | 536 | | |
| |||
558 | 561 | | |
559 | 562 | | |
560 | 563 | | |
| 564 | + | |
561 | 565 | | |
562 | 566 | | |
563 | 567 | | |
| |||
672 | 676 | | |
673 | 677 | | |
674 | 678 | | |
| 679 | + | |
| 680 | + | |
675 | 681 | | |
676 | 682 | | |
677 | 683 | | |
| |||
0 commit comments