Add CI workflow to check line endings of all source files (#2082)

In addition, all found errors (formatting & line ending) have been fixed in this PR.
This commit is contained in:
pajlada
2020-10-18 15:54:48 +02:00
committed by GitHub
parent 4199a01b96
commit f191de2514
17 changed files with 959 additions and 934 deletions
+3 -1
View File
@@ -4,12 +4,14 @@ set -eu
fail="0"
clang-format --version
while read -r file; do
if ! diff -u <(cat "$file") <(clang-format "$file"); then
echo "$file differs!!!!!!!"
fail="1"
fi
done < <(find src/ \( -iname "*.hpp" -o -iname "*.cpp" \))
done < <(find src/ -type f \( -iname "*.hpp" -o -iname "*.cpp" \))
if [ "$fail" = "1" ]; then
echo "At least one file is poorly formatted - check the output above"