clang_format.hook 381 B

123456789101112131415
  1. #!/bin/bash
  2. # set -e
  3. #
  4. # readonly VERSION="3.8"
  5. #
  6. # version=$(clang-format -version)
  7. #
  8. # if ! [[ $version == *"$VERSION"* ]]; then
  9. # echo "clang-format version check failed."
  10. # echo "a version contains '$VERSION' is needed, but get '$version'"
  11. # echo "you can install the right version, and make an soft-link to '\$PATH' env"
  12. # exit -1
  13. # fi
  14. #
  15. # clang-format $@