Skip to content

Commit 94f879c

Browse files
committed
Merge branch 'sg/travis-cocci-diagnose-failure'
Update the way we run static analysis tool at TravisCI to make it easier to use its findings. * sg/travis-cocci-diagnose-failure: travis-ci: fail if Coccinelle static analysis found something to transform travis-ci: run Coccinelle static analysis with two parallel jobs
2 parents 10639c3 + 0860a76 commit 94f879c

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

ci/run-static-analysis.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@
55

66
. ${0%/*}/lib-travisci.sh
77

8-
make coccicheck
8+
make --jobs=2 coccicheck
9+
10+
set +x
11+
12+
fail=
13+
for cocci_patch in contrib/coccinelle/*.patch
14+
do
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
21+
done
22+
23+
if test -n "$fail"
24+
then
25+
echo "$(tput setaf 1)error: Coccinelle suggested some changes$(tput sgr0)"
26+
exit 1
27+
fi
928

1029
save_good_tree

0 commit comments

Comments
 (0)