Commit e662364
ci: add line-ending check as first verify step
Add a new `line-endings` job to `verify.yml` that runs before any
other verify job via `needs:`. It uses `git ls-files --eol` to check
that every text file in the index is stored as LF, exempting the
`.bat`/`.cmd`/`.ps1` extensions that the `.gitattributes` keeps on
CRLF for Windows compatibility.
The check is redundant with Git's own clean filter (which normalizes
on commit per `.gitattributes: * text=auto eol=lf`) but catches two
gaps:
* A file that Git's `text=auto` heuristic misclassifies as binary
(e.g., an early null byte) silently keeps whatever line endings it
was committed with.
* A filter-bypass via `--literally` or a custom hook path.
Making the other three verify jobs (`pmd`, `checkstyle`,
`maven-verify`) depend on this one means a line-ending violation
fails the pipeline within seconds instead of a Maven build later.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 7069be3 commit e662364
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
31 | 51 | | |
| 52 | + | |
32 | 53 | | |
33 | 54 | | |
34 | 55 | | |
| |||
0 commit comments