]> git.ipfire.org Git - thirdparty/git.git/blame - ci/run-static-analysis.sh
ci: rename the library of common functions
[thirdparty/git.git] / ci / run-static-analysis.sh
CommitLineData
657343a6
LS
1#!/bin/sh
2#
3# Perform various static code analysis checks
4#
5
c2160f2d 6. ${0%/*}/lib.sh
657343a6 7
4ab8d1af 8make --jobs=2 coccicheck
9cc2c76f 9
0860a764
SG
10set +x
11
12fail=
13for cocci_patch in contrib/coccinelle/*.patch
14do
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
20 fi
21done
22
23if test -n "$fail"
24then
25 echo "$(tput setaf 1)error: Coccinelle suggested some changes$(tput sgr0)"
26 exit 1
27fi
28
9cc2c76f 29save_good_tree