mirror of
https://github.com/QuasarApp/qca.git
synced 2025-04-27 03:54:31 +00:00
11 lines
353 B
Bash
11 lines
353 B
Bash
#!/usr/bin/env bash
|
|
|
|
readonly output=$(git clang-format -v --diff)
|
|
|
|
if [[ "$output" == *"no modified files to format"* ]]; then exit 0; fi
|
|
if [[ "$output" == *"clang-format did not modify any files"* ]]; then exit 0; fi
|
|
|
|
echo "ERROR: you need to run git clang-format on your commit"
|
|
echo " git clang-format -f is potentially what you want"
|
|
exit 1
|