Files
FastDeploy/.clang_format.hook
jiangjiajun 9d87046d78 first commit
2022-07-05 09:30:15 +00:00

16 lines
361 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
set -e
readonly VERSION="3.8"
version=$(clang-format -version)
if ! [[ version=="VERSION"* ]]; then
echo "clang-format version check failed."
echo "a version contains 'VERSIONisneeded,butgetversion'"
echo "you can install the right version, and make an soft-link to '$PATH' env"
exit -1
fi
clang-format -style=google $@