diff options
author | Moshe Kaplan <me@moshekaplan.com> | 2020-08-24 18:47:20 +0000 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2020-10-15 19:39:11 +0000 |
commit | 3dde70de2cdd3ab66ee27957bec9f0e1b0eee6e8 (patch) | |
tree | 27ea8632e192f06c7d76d820d74d07bce817153a /.gitlab-ci.yml | |
parent | 6d752876ef8df5af5f0c76241344f1c144035ef9 (diff) |
.gitlab-ci: Generate cppcheck reports
Modify the cppcheck job to also generate cppcheck's reports
and provide them as artifacts to the user.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 931577e0fb..432c27f21d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -225,17 +225,22 @@ merge-req:ubuntu-clang-other-tests: rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' script: - - apt-get install -y cppcheck clang-tools + - apt-get install -y cppcheck clang-tools python-pygments # build-ubuntu puts us in `build`. - cd .. - python3 tools/checklicenses.py - - ./tools/cppcheck/cppcheck.sh -l 1 + - ./tools/cppcheck/cppcheck.sh -l 1 -x | tee cppcheck_report.xml + - if [[ -s "cppcheck_report.xml" ]]; then cppcheck-htmlreport --file cppcheck_report.xml --report-dir . ; fi - cd build - cmake -DENABLE_EXTRA_COMPILER_WARNINGS=on -DENABLE_CHECKHF_CONFLICT=on -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DENABLE_CCACHE=ON -G Ninja .. - ninja - ./run/tshark -v - sh -c '[ ! -e ../tools/validate-clang-check.sh ] || ../tools/validate-clang-check.sh' - ninja checkAPI + artifacts: + paths: + - cppcheck_report.xml + - cppcheck_report.html # XXX This is still beta: # https://docs.gitlab.com/ee/user/gitlab_com/index.html#windows-shared-runners-beta |