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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user