tvl-depot/third_party/git/ci/run-static-analysis.sh
Vincent Ambo 93ba78d6f4 revert(3p/git): Revert merge of git upstream at v2.26.2
This causes cgit to serve error pages, which is undesirable.

This reverts commit 5229c9b232, reversing
changes made to f2b211131f.
2020-05-26 00:06:52 +01:00

29 lines
471 B
Bash
Executable file

#!/bin/sh
#
# Perform various static code analysis checks
#
. ${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
save_good_tree