diff options
Diffstat (limited to 'hooks/clang-tidy.sh')
-rwxr-xr-x | hooks/clang-tidy.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hooks/clang-tidy.sh b/hooks/clang-tidy.sh new file mode 100755 index 00000000..c51b4f7b --- /dev/null +++ b/hooks/clang-tidy.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh + +if [[ ! -f .clang-tidy ]]; then + echo Cannot find .clang-tidy + exit 1 +fi + +echo Running clang-tidy +clang-tidy -p cmake-build-debug $(git diff --staged --name-only --diff-filter=AM) |