summaryrefslogtreecommitdiff
path: root/ci/run-static-analysis.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/run-static-analysis.sh')
-rwxr-xr-xci/run-static-analysis.sh23
1 files changed, 22 insertions, 1 deletions
diff --git a/ci/run-static-analysis.sh b/ci/run-static-analysis.sh
index 68dd0f080e..5688f261d0 100755
--- a/ci/run-static-analysis.sh
+++ b/ci/run-static-analysis.sh
@@ -5,4 +5,25 @@
. ${0%/*}/lib-travisci.sh
-make coccicheck
+make --jobs=2 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