mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
Add an equivalent to "make hdr-check" target to meson based builds. * kn/meson-hdr-check: makefile/meson: add 'check-headers' as alias for 'hdr-check' meson: add support for 'hdr-check' meson: rename 'third_party_sources' to 'third_party_excludes' meson: move headers definition from 'contrib/coccinelle' coccinelle: meson: rename variables to be more specific ci/github: install git before checking out the repository
37 lines
553 B
Bash
Executable File
37 lines
553 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
|
|
|
|
make check-headers ||
|
|
exit 1
|
|
|
|
make check-pot
|
|
|
|
${0%/*}/check-unsafe-assertions.sh
|
|
|
|
save_good_tree
|