ruff
Display diffs for `ruff format --check` and add support for different output formats
#20443
Merged

Display diffs for `ruff format --check` and add support for different output formats #20443

ntBre merged 37 commits into main from brent/formatter-diagnostics
ntBre
github-actions
MichaReiser
ntBre ntBre force pushed from 64cb945f to 8c986740 132 days ago
ntBre ntBre force pushed from 8c986740 to 14fcf016 132 days ago
ntBre ntBre force pushed from 6c60142c to dcce3072 128 days ago
ntBre ntBre force pushed from dcce3072 to 29cd7fa1 128 days ago
ntBre ntBre force pushed from 29cd7fa1 to 5996dc3f 126 days ago
ntBre
ntBre ntBre added preview
ntBre ntBre added diagnostics
ntBre ntBre added formatter
ntBre add DiagnosticId::Unformatted
4620604a
ntBre add --output-format to the ruff format cli
92208abd
ntBre allow tempdir_filter to take any AsRef<Path>
041b35da
ntBre respect show_fix_status for `full` output
9bb4374f
ntBre suppress the URL for all non-lint DiagnosticIds
9cffdd80
ntBre fix a couple of Rome references
5bfe3f24
ntBre add `CellOffsets::ranges` helper
76e63b36
ntBre convert FormatPathResults to Diagnostics just before rendering
7e48156a
ntBre build a real notebook index and render cell diffs
a5ec195c
ntBre convert errors to diagnostics too
4ea16b7d
ntBre allow passing a header offset into annotate-snippets
39f96cc9
ntBre factor out PanicError::to_diagnostic_message
a43fa932
ntBre add error tests, set_file_level, and improve panic formatting
959f55ae
ntBre ntBre force pushed from 5996dc3f to 959f55ae 125 days ago
github-actions
github-actions
ntBre
ntBre ntBre marked this pull request as ready for review 125 days ago
ntBre ntBre requested a review from carljm carljm 125 days ago
ntBre ntBre requested a review from MichaReiser MichaReiser 125 days ago
ntBre ntBre requested a review from sharkdp sharkdp 125 days ago
ntBre ntBre requested a review from dcreager dcreager 125 days ago
ntBre ntBre requested a review from BurntSushi BurntSushi 125 days ago
ntBre ntBre requested a review from dhruvmanila dhruvmanila 125 days ago
ntBre ntBre removed review request from dcreager dcreager 125 days ago
ntBre ntBre removed review request from carljm carljm 125 days ago
ntBre ntBre removed review request from BurntSushi BurntSushi 125 days ago
ntBre ntBre removed review request from sharkdp sharkdp 125 days ago
ntBre ntBre removed review request from dhruvmanila dhruvmanila 125 days ago
ntBre ntBre changed the title [WIP] Use `Diagnostic`s for rendering formatting results Use `Diagnostic`s for rendering formatting results 125 days ago
MichaReiser
MichaReiser commented on 2025-09-26
ntBre use FormatResult::diff for checking, revert other changes
2ce8f808
ntBre point out preview restriction on format --output-format
007a22f1
ntBre emit a warning for non-preview --output-format usage
451dc0c4
ntBre sort errors and diagnostics together
78fdc60d
ntBre factor out create_panic_diagnostic, reuse in the linter
28ebcd55
ntBre delete TODO for ignore::Errors
090468d9
ntBre use FormatError for PrintError
723d1d56
ntBre add DisplayParseError::error and render the ParseErrorType directly
05faf43c
ntBre calculate a real range for the diagnostics
ed63b7e4
ntBre reuse FormatCommandError::Write instead of Diff
c1a3b44a
ntBre DiagnosticId::RangeFormatNotebook -> InvalidCliOption
73eb86d0
ntBre DiagnosticId::FormatError -> InternalError
aee8fd36
ntBre add a todo about the offset hack
0668704f
ntBre file_level -> hide_snippet
519b6fa8
MichaReiser
MichaReiser approved these changes on 2025-09-29
ntBre debug assert FormatResult::Diff
18640189
ntBre narrow edit range to modified lines
aa532d78
ntBre account for context lines when computing the line number width
cbf7d1f3
ntBre mark FormatModuleError::InvalidSyntax as an internal error
7b8b4426
ntBre Merge branch 'main' into brent/formatter-diagnostics
57db0315
ntBre use render_diagnostics helper
74de549c
ntBre fix range narrowing for strict prefixes
6a72314d
ntBre range -> modified_range, restore previous range references
793f5261
ntBre only restrict the end of the script line counting
bf48b9bc
ntBre
MichaReiser
MichaReiser approved these changes on 2025-09-30
ntBre use loop for prefix_length too, use guarded break for suffix
bedfc6fd
ntBre ntBre changed the title Use `Diagnostic`s for rendering formatting results Display diffs for `ruff format --check` and add support for different output formats 120 days ago
ntBre ntBre merged 2b1d3c60 into main 120 days ago
ntBre ntBre deleted the brent/formatter-diagnostics branch 120 days ago
kaddkaka
ntBre
pygarap
ntBre
joukewitteveen
kaddkaka
ntBre

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
No one assigned
Labels
Milestone