mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
20 lines
412 B
Bash
Executable file
20 lines
412 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
fail="0"
|
|
|
|
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" \))
|
|
|
|
if [ "$fail" = "1" ]; then
|
|
echo "At least one file is poorly formatted - check the output above"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Everything seems to be formatted properly! Good job"
|