Warning, /libraries/qca/hooks/pre-commit is written in an unsupported language. File is not indexed.
0001 #!/usr/bin/env bash 0002 0003 readonly output=$(git clang-format -v --diff) 0004 0005 if [[ "$output" == *"no modified files to format"* ]]; then exit 0; fi 0006 if [[ "$output" == *"clang-format did not modify any files"* ]]; then exit 0; fi 0007 0008 echo "ERROR: you need to run git clang-format on your commit" 0009 echo " git clang-format -f is potentially what you want" 0010 exit 1