diff options
Diffstat (limited to 'ci/run-static-analysis.sh')
-rwxr-xr-x | ci/run-static-analysis.sh | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/ci/run-static-analysis.sh b/ci/run-static-analysis.sh index fe4ee4e06b..65bcebda41 100755 --- a/ci/run-static-analysis.sh +++ b/ci/run-static-analysis.sh @@ -3,8 +3,30 @@ # Perform various static code analysis checks # -. ${0%/*}/lib-travisci.sh +. ${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 + +make hdr-check || +exit 1 + save_good_tree |