Merge branch 'bc/hash-independent-tests-part-4'
[git/raj.git] / ci / run-static-analysis.sh
bloba19aa7ebbc0931fa56acfccdcc0d8bc1ad94ea2c
1 #!/bin/sh
3 # Perform various static code analysis checks
6 . ${0%/*}/lib.sh
8 make coccicheck
10 set +x
12 fail=
13 for cocci_patch in contrib/coccinelle/*.patch
15 if test -s "$cocci_patch"
16 then
17 echo "$(tput setaf 1)Coccinelle suggests the following changes in '$cocci_patch':$(tput sgr0)"
18 cat "$cocci_patch"
19 fail=UnfortunatelyYes
21 done
23 if test -n "$fail"
24 then
25 echo "$(tput setaf 1)error: Coccinelle suggested some changes$(tput sgr0)"
26 exit 1
29 save_good_tree