ruff
f381eb1d - Prioritize human-readable names in CLI output (#25869)

Commit
42 days ago
Prioritize human-readable names in CLI output (#25869) Summary -- This PR swaps the rule name and code in our `--show-fixes` output, which previously looked like this: <img width="324" height="107" alt="image" src="https://github.com/user-attachments/assets/32dff652-421c-4e7a-adbd-ac87cc740965" /> and now looks like this in preview: <img width="314" height="103" alt="image" src="https://github.com/user-attachments/assets/d7d942d6-d5a5-4622-b9a2-a271eb5b0663" /> The actual code change is just for this one flag, but I also examined the other CLI flags (besides diagnostic output formats, which I'll update separately) and think that nothing else needs to be updated. The other two main candidates were `--statistics` and `--show-settings`, but these already show both codes and names prominently. `--show-settings` even prioritizes them over codes: ```console ❯ ruff check --no-cache --ignore-noqa --statistics 1 F401 [*] unused-import Found 1 error. [*] 1 fixable with the `--fix` option. ❯ ruff check --no-cache --show-settings ... linter.rules.enabled = [ multiple-imports-on-one-line (E401), module-import-not-at-top-of-file (E402), ... ] ... ``` Test Plan -- New CLI test and the screenshots above
Author
Parents
Loading