Skip to content

CI: enforce newline at EOF and fix existing violations#3010

Open
arsh118 wants to merge 1 commit intoOpen-MSS:developfrom
arsh118:fix-ci-missing-eof-newline
Open

CI: enforce newline at EOF and fix existing violations#3010
arsh118 wants to merge 1 commit intoOpen-MSS:developfrom
arsh118:fix-ci-missing-eof-newline

Conversation

@arsh118
Copy link

@arsh118 arsh118 commented Feb 25, 2026

Purpose of PR?:

Fixes #

Does this PR introduce a breaking change?

If the changes in this PR are manually verified, list down the scenarios covered::

Additional information for reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs

Does this PR results in some Documentation changes?
If yes, include the list of Documentation changes

Checklist:

  • Bug fix. Fixes #
  • New feature (Non-API breaking changes that adds functionality)
  • PR Title follows the convention of <type>: <subject>
  • Commit has unit tests

@ReimarBauer ReimarBauer requested a review from matrss February 25, 2026 08:57
Copy link
Collaborator

@matrss matrss left a comment

Choose a reason for hiding this comment

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

Hey! Thanks for the PR.

Unfortunately it doesn't address the issue sufficiently. We have some binary files in the repository that this check also finds, while the rule should only apply to text files.

Could you please explain why the check for the newline works? I get that you are reading out the last byte of each file, but I don't understand why read -r _ exits with non-zero when that byte is not a newline. I couldn't find documentation for this behavior.

The first -f check seems redundant, since git ls-files should already only output file paths. The first read would also mangle some (admittedly very weird) file names containing e.g. backslashes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants