Skip to content

Conversation

@Junnygram
Copy link
Contributor

Description

Motivation:
This PR introduces a check to ensure all files in the repository end with a trailing newline character. This ensures compliance with POSIX standards and prevents "No newline at end of file" warnings in git diffs, keeping the codebase clean and consistent.

What changed:

  • Added hack/check-eof-newline.sh script to verify and optionally fix files missing EOF newlines.
  • Added make check-eof-newline and make fix-eof-newline targets to the Makefile.
  • Ran the fix script to add trailing newlines to ~250 files that were missing them (mostly .yaml, .md, and .go files).

Related issues:
Fixes #12133

Change Type

/kind cleanup

Changelog

NONE

Additional Notes

I used the new make fix-eof-newline target to apply these changes automatically. The script uses git ls-files to respect .gitignore and skips binary files.

@gateway-bot gateway-bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none labels Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add linter for EOF newlines

2 participants