Debian Codegraph @

hooks/pre-commit

raw symbols SCIP
1 #!/usr/bin/env bash
2
3 readonly output=$(git clang-format -v --diff)
4
5 if [[ "$output" == *"no modified files to format"* ]]; then exit 0; fi
6 if [[ "$output" == *"clang-format did not modify any files"* ]]; then exit 0; fi
7
8 echo "ERROR: you need to run git clang-format on your commit"
9 echo " git clang-format -f is potentially what you want"
10 exit 1