diff --git a/common/.gitlab-ci.yml b/common/.gitlab-ci.yml index ad0d0f5e3..59fc15271 100644 --- a/common/.gitlab-ci.yml +++ b/common/.gitlab-ci.yml @@ -49,3 +49,27 @@ test:unit: image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} tags: - docker + +test:cppcheck: + stage: test + script: + - cppcheck -j $(nproc) + --max-configs=32 + --error-exitcode=1 + --quiet + --inline-suppr + --enable=warning,performance,portability,information,missingInclude + --std=c++11 + -I include + lib/ + tests/unit/ | tee cppcheck.log + image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} + dependencies: + - build:source + tags: + - docker + artifacts: + when: on_failure + paths: + - cppcheck.log + expose_as: cppcheck diff --git a/common/Dockerfile b/common/Dockerfile index 275f2ba81..2720ab787 100644 --- a/common/Dockerfile +++ b/common/Dockerfile @@ -46,6 +46,7 @@ LABEL \ RUN dnf -y install \ gcc gcc-c++ \ make cmake \ + cppcheck \ pkgconfig git curl tar # Dependencies