Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4

- name: Check for whitespace issues in the repository
# The two example.txt files need to be excluded because whitespace at EOL is part
# of their format and they fail to parse otherwise.
Expand All @@ -69,6 +70,19 @@ jobs:
echo "$issues"
[ "$issues" == "" ] || exit 1

- name: Check for missing newline at EOF
run: |
missing_newline="$(
git ls-files | while read f; do
[ -f "$f" ] || continue
if [ -s "$f" ]; then
tail -c1 "$f" | read -r _ || echo "$f"
fi
done
)"
echo "$missing_newline"
[ "$missing_newline" == "" ] || exit 1

ensure-sha-pinned-actions:
runs-on: ubuntu-latest
steps:
Expand Down