1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/sanity/code-smell/line-endings.sh
Matt Clay bb3801bafd Cleanup and fixes for code smell scripts.
- Fix shellcheck issues.
- Add .tox exclusions.
2016-11-03 23:56:30 -07:00

14 lines
397 B
Bash
Executable file

#!/bin/sh
grep -RIPl '\r' . 2>/dev/null \
--exclude-dir .git \
| grep -v -E \
-e '/.tox/' \
| grep -v -F \
-e './test/integration/targets/win_regmerge/templates/win_line_ending.j2'
if [ $? -ne 1 ]; then
printf 'One or more file(s) listed above have invalid line endings.\n'
printf 'Make sure all files use "\\n" for line endings instead of "\\r\\n".\n'
exit 1
fi