Skip to content

Commit 151fb04

Browse files
committed
ci: Enforce unix-style LF line endings
1 parent 779402c commit 151fb04

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,26 @@ jobs:
4747
- name: Check For Trailing Whitespace
4848
run: |
4949
set +e
50-
grep --exclude="README.md" --exclude-dir="portable" -rnI -e "[[:blank:]]$" .
50+
grep --exclude="*.md" --exclude-dir=".git" -rnI -e "[[:blank:]]$" .
5151
if [ "$?" = "0" ]; then
5252
echo "Files have trailing whitespace."
5353
exit 1
5454
else
5555
exit 0
5656
fi
57+
shell: bash
58+
- name: Check for CRLF
59+
working-directory: ${{ inputs.path }}
60+
run: |
61+
set +e
62+
find . -path ./.git -prune -o -exec file {} + | grep "CRLF"
63+
if [ "$?" = "0" ]; then
64+
echo "Files have CRLF line endings."
65+
exit 1
66+
else
67+
exit 0
68+
fi
69+
shell: bash
5770

5871
url-check:
5972
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)