]> 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:41:06 +0000 (10:41 +0200)
Commit 00f12220c08a6e5fd2a4e5eef6ca0cf34b4a7b5b 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 07ec3071f51a0214337986e5586edbf00842a7a3..720b6e8d7531cc9a2bf9f16683b99648c5bf1be2 100644 (file)
@@ -357,6 +357,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: