From f6491cacd19110f4386d3ac10189cb7f678df02a Mon Sep 17 00:00:00 2001 From: Brent Westbrook <36778786+ntBre@users.noreply.github.com> Date: Mon, 18 Aug 2025 11:46:16 -0400 Subject: [PATCH] Add `full` output format changes to the changelog (#19968) Summary -- I thought this might warrant a small blog-style writeup, especially since we already got a question about it (#19966), but I'm happy to switch back to a one-liner under `### Other changes` if preferred. I'll copy whatever we add here to the release notes too. Do we need a note at the top about the late addition? --- CHANGELOG.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 323ef6667a..d9952e0f66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,8 +24,31 @@ ### Other changes - Build `riscv64` binaries for release ([#19819](https://github.com/astral-sh/ruff/pull/19819)) + - Add rule code to error description in GitLab output ([#19896](https://github.com/astral-sh/ruff/pull/19896)) +- Improve rendering of the `full` output format ([#19415](https://github.com/astral-sh/ruff/pull/19415)) + + Below is an example diff for [`F401`](https://docs.astral.sh/ruff/rules/unused-import/): + + ```diff + -unused.py:8:19: F401 [*] `pathlib` imported but unused + +F401 [*] `pathlib` imported but unused + + --> unused.py:8:19 + | + 7 | # Unused, _not_ marked as required (due to the alias). + 8 | import pathlib as non_alias + - | ^^^^^^^^^ F401 + + | ^^^^^^^^^ + 9 | + 10 | # Unused, marked as required. + | + - = help: Remove unused import: `pathlib` + +help: Remove unused import: `pathlib` + ``` + + For now, the primary difference is the movement of the filename, line number, and column information to a second line in the header. This new representation will allow us to make further additions to Ruff's diagnostics, such as adding sub-diagnostics and multiple annotations to the same snippet. + ## 0.12.8 ### Preview features