diff options
author | Vincent Ambo <Vincent Ambo> | 2020-01-11T23·36+0000 |
---|---|---|
committer | Vincent Ambo <Vincent Ambo> | 2020-01-11T23·40+0000 |
commit | 7ef0d62730840ded097b524104cc0a0904591a63 (patch) | |
tree | a670f96103667aeca4789a95d94ca0dff550c4ce /third_party/git/ci/run-static-analysis.sh | |
parent | 6a2a3007077818e24a3d56fc492ada9206a10cf0 (diff) | |
parent | 1b593e1ea4d2af0f6444d9a7788d5d99abd6fde5 (diff) |
merge(third_party/git): Merge squashed git subtree at v2.23.0 r/373
Merge commit '1b593e1ea4d2af0f6444d9a7788d5d99abd6fde5' as 'third_party/git'
Diffstat (limited to 'third_party/git/ci/run-static-analysis.sh')
-rwxr-xr-x | third_party/git/ci/run-static-analysis.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/third_party/git/ci/run-static-analysis.sh b/third_party/git/ci/run-static-analysis.sh new file mode 100755 index 000000000000..a19aa7ebbc09 --- /dev/null +++ b/third_party/git/ci/run-static-analysis.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Perform various static code analysis checks +# + +. ${0%/*}/lib.sh + +make coccicheck + +set +x + +fail= +for cocci_patch in contrib/coccinelle/*.patch +do + if test -s "$cocci_patch" + then + echo "$(tput setaf 1)Coccinelle suggests the following changes in '$cocci_patch':$(tput sgr0)" + cat "$cocci_patch" + fail=UnfortunatelyYes + fi +done + +if test -n "$fail" +then + echo "$(tput setaf 1)error: Coccinelle suggested some changes$(tput sgr0)" + exit 1 +fi + +save_good_tree |