1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-20 09:56:10 +02:00
git/ci
SZEDER Gábor 0860a7641b travis-ci: fail if Coccinelle static analysis found something to transform
Coccinelle's and in turn 'make coccicheck's exit code only indicates
that Coccinelle managed to finish its analysis without any errors
(e.g. no unknown --options, no missing files, no syntax errors in the
semantic patches, etc.), but it doesn't indicate whether it found any
undesired code patterns to transform or not.  To find out the latter,
one has to look closer at 'make coccicheck's standard output and look
for lines like:

  SPATCH result: contrib/coccinelle/<something>.cocci.patch

And this only indicates that there is something to transform, but to
see what the suggested transformations are one has to actually look
into those '*.cocci.patch' files.

This makes the automated static analysis build job on Travis CI not
particularly useful, because it neither draws our attention to
Coccinelle's findings, nor shows the actual findings.  Consequently,
new topics introducing undesired code patterns graduated to master
on several occasions without anyone noticing.

The only way to draw attention in such an automated setting is to fail
the build job.  Therefore, modify the 'ci/run-static-analysis.sh'
build script to check all the resulting '*.cocci.patch' files, and
fail the build job if any of them turns out to be not empty.  Include
those files' contents, i.e. Coccinelle's suggested transformations, in
the build job's trace log, so we'll know why it failed.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-07-23 12:08:38 -07:00
..
install-dependencies.sh travis-ci: set GIT_TEST_HTTPD in 'ci/lib-travisci.sh' 2017-12-12 12:58:28 -08:00
lib-travisci.sh travis-ci: run gcc-8 on linux-gcc jobs 2018-05-21 14:14:09 +09:00
print-test-failures.sh travis-ci: only print test failures if there are test results available 2017-12-27 12:15:22 -08:00
run-build-and-tests.sh ci: exercise the whole test suite with uncommon code in pack-objects 2018-04-16 12:38:59 +09:00
run-linux32-build.sh travis-ci: don't fail if user already exists on 32 bit Linux build job 2018-01-30 13:27:19 -08:00
run-linux32-docker.sh travis-ci: don't run the test suite as root in the 32 bit Linux build 2018-01-30 13:27:19 -08:00
run-static-analysis.sh travis-ci: fail if Coccinelle static analysis found something to transform 2018-07-23 12:08:38 -07:00
run-windows-build.sh travis-ci: record and skip successfully built trees 2018-01-02 11:25:58 -08:00
test-documentation.sh travis-ci: check that all build artifacts are .gitignore-d 2018-01-03 13:29:19 -08:00