Skip to content

Avoid rendering fix lines with trailing whitespace after |#24343

Merged
MichaReiser merged 1 commit intomainfrom
micha/fixes-trailing-whitespace
Apr 1, 2026
Merged

Avoid rendering fix lines with trailing whitespace after |#24343
MichaReiser merged 1 commit intomainfrom
micha/fixes-trailing-whitespace

Conversation

@MichaReiser
Copy link
Copy Markdown
Member

@MichaReiser MichaReiser commented Apr 1, 2026

Summary

This PR changes how we render empty lines when showing fixes.

  • Before: <sigil> (note the trailing whitespace)
  • Now: <sigil>

Where sigil is one of -, + and |.

The main purpose of the whitespace is to align the diff content. But given that there isn't any, it seems unnecessary to render the because there's no content to align.

@MichaReiser MichaReiser added the diagnostics Related to reporting of diagnostics. label Apr 1, 2026
@MichaReiser MichaReiser force-pushed the micha/fixes-trailing-whitespace branch from 61f4752 to 132e6a7 Compare April 1, 2026 09:38
@MichaReiser MichaReiser marked this pull request as ready for review April 1, 2026 09:41
@astral-sh-bot astral-sh-bot bot requested a review from ntBre April 1, 2026 09:41
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Apr 1, 2026

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser MichaReiser force-pushed the micha/fixes-trailing-whitespace branch from 132e6a7 to c1dda87 Compare April 1, 2026 11:47
Copy link
Copy Markdown
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(didn't check through the whole diff, but the change makes sense to me!)

@carljm carljm removed their request for review April 1, 2026 14:20
@MichaReiser MichaReiser merged commit 6ceb5ee into main Apr 1, 2026
48 checks passed
@MichaReiser MichaReiser deleted the micha/fixes-trailing-whitespace branch April 1, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diagnostics Related to reporting of diagnostics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants