mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
269e7a07b4
* chore: Unify all .clang-format files in the root dir * Update `scripts/check-format.sh` to include all source dirs * Add changelog entry
21 lines
483 B
Bash
Executable file
21 lines
483 B
Bash
Executable file
#!/bin/bash
|
|
|
|
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/ tests/src benchmarks/src mocks/include -type f \( -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"
|