]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Ensure cppcheck creates a HTML report upon failure
authorMichał Kępień <michal@isc.org>
Mon, 18 May 2020 08:23:06 +0000 (10:23 +0200)
committerMichał Kępień <michal@isc.org>
Mon, 18 May 2020 08:33:14 +0000 (10:33 +0200)
Commit 691c8f68283f34aa2d486a29c08b5d683f0675aa broke the cppcheck job
in GitLab CI: when cppcheck fails, the script is immediately
interrupted, preventing cppcheck-htmlreport from being run.  To ensure
the HTML report is generated when cppcheck fails, revert to invoking
cppcheck-htmlreport in the "after_script" part of the job.

(cherry picked from commit cb2037ee9d88351222b6f1c888aa35fe75036021)

.gitlab-ci.yml

index 09df20fd06c539fb43045d8477241d5968870c76..3cb4eaad06ef9f9562a899651266c02e749dbd81 100644 (file)
@@ -358,6 +358,7 @@ stages:
     - export GCC_VERSION=$(gcc --version | sed -n 's/.*\([0-9]\+\)\.[0-9]\+\.[0-9]\+.*/\1/p')
     - sed -i "/gcc\",/a\"-DCPPCHECK\", \"-D__STDC__\", \"-D__GNUC__=${GCC_VERSION}\"," compile_commands.json
     - *run_cppcheck
+  after_script:
     - *cppcheck_report_html
   artifacts:
     paths: