aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2021-09-03 19:26:11 +0000
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-09-06 04:04:46 +0000
commitd940352da7ebc8c8e0d9399bbd3515e145f54c39 (patch)
treece9d396ba451ff1480233ac07826fdb59b21ab98 /.gitlab-ci.yml
parentda6ef0a3f06ba2f78094fe4b2ecb0e0bee699afa (diff)
gitlab-ci: enhance cppcheck
display on CI build, the text output (and not xml) store all cppcheck output files on cppcheck folder (you need to launch cppcheck twice for generate txt and xml)
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml9
1 files changed, 5 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6daa9b9f83..b6c06d4cc6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -550,10 +550,12 @@ Code Checks + Clang Warnings:
# build-ubuntu puts us in `build`.
- cd ..
- python3 tools/checklicenses.py
- - ./tools/cppcheck/cppcheck.sh -l 1 -x | tee cppcheck_report.xml
+ - mkdir cppcheck
+ - ./tools/cppcheck/cppcheck.sh -l 1 | tee cppcheck/cppcheck_report.txt
+ - if [[ -s "cppcheck/cppcheck_report.txt" ]]; then ./tools/cppcheck/cppcheck.sh -l 1 -x > cppcheck/cppcheck_report.xml ; fi
+ - if [[ -s "cppcheck/cppcheck_report.txt" ]]; then cppcheck-htmlreport --file cppcheck/cppcheck_report.xml --report-dir cppcheck ; fi
- ./tools/check_typed_item_calls.py --commits 1 | tee item_calls_check.txt
- ./tools/check_tfs.py --commits 1 | tee tfs_check.txt
- - if [[ -s "cppcheck_report.xml" ]]; then cppcheck-htmlreport --file cppcheck_report.xml --report-dir . ; fi
- cd build
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
- cmake -DENABLE_EXTRA_COMPILER_WARNINGS=on -DENABLE_CHECKHF_CONFLICT=on -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DENABLE_CCACHE=ON -G Ninja ..
@@ -567,8 +569,7 @@ Code Checks + Clang Warnings:
paths:
- clang_report.html
- clang_analyzer_check.txt
- - cppcheck_report.html
- - cppcheck_report.xml
+ - cppcheck
- item_calls_check.txt
- tfs_check.txt
- checkhf_conflict.txt