Skip to content

EmptyNewlineAtEndOfFile not to alter empty files#7389

Merged
greg-at-moderne merged 1 commit intomainfrom
greg-empty-newline-eof
Apr 16, 2026
Merged

EmptyNewlineAtEndOfFile not to alter empty files#7389
greg-at-moderne merged 1 commit intomainfrom
greg-empty-newline-eof

Conversation

@greg-at-moderne
Copy link
Copy Markdown
Contributor

@greg-at-moderne greg-at-moderne commented Apr 16, 2026

What's changed?

Minor adjustment to the existing EmptyNewlineAtEndOfFile recipe. That is not to alter (add newline) to empty (0-byte) files.

What's your motivation?

While this technically contradicts the name of the recipe, this is the industry expected way of handling this. Thus should be less surprising to the user.

@greg-at-moderne greg-at-moderne self-assigned this Apr 16, 2026
@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite Apr 16, 2026
@greg-at-moderne greg-at-moderne marked this pull request as ready for review April 16, 2026 15:31
@greg-at-moderne greg-at-moderne merged commit 0b08138 into main Apr 16, 2026
1 check passed
@greg-at-moderne greg-at-moderne deleted the greg-empty-newline-eof branch April 16, 2026 15:31
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant