Check that all files use LF line endings in CI
parent
75e904f6d4
commit
ea51e78283
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if \
|
||||||
|
grep \
|
||||||
|
--recursive \
|
||||||
|
--files-with-matches \
|
||||||
|
--binary \
|
||||||
|
--binary-files=without-match \
|
||||||
|
--max-count=1 \
|
||||||
|
--exclude-dir="\.git" \
|
||||||
|
$'\r' \
|
||||||
|
. \
|
||||||
|
; then
|
||||||
|
# TODO exit status should be number of files with wrong endings found
|
||||||
|
echo -e "Found at least a file with CRLF endings."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "No files with CRLF endings found."
|
||||||
|
exit 0
|
Loading…
Reference in New Issue