]> 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:23:06 +0000 (10:23 +0200)
Commit ec72d1100d7e86c131ab1936f91ed4da87c48a4b 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.

.gitlab-ci.yml

index 120c5a91af964d9db80132252081df4710b05dc3..3ac064de4e33c8c48b5a87c2263d1df2ac7319bb 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: