3.206 Line
A sequence of zero or more non-<newline> characters plus a terminating <newline> character.
No, newline at end of file.
Lint tracked non-binary files that do not end in a newline, either locally with a Git subcommand or in CI with GitHub Actions.
Install git-no-newlines in your path and run
git no-newlinesin a Git repository to list non-binary files that do not terminate in a newline.
Setting EXCLUDE_PATTERN to an extended-grep-compatible pattern will exclude matching files.
exclusion_pattern- Optional extended-
grep-compatible pattern of filenames to exclude.
- Optional extended-
- name: Lint newlines
uses: fionn/newline-linter@master
with:
exclusion_pattern: intentionally_unterminated_fileSee this repository's workflow for a more complete example.