diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..76c97b91e8adc88a866d2c11acbf5fc73d83be64 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,28 @@ +variables: + SOURCE_FOLDER: "src" + +include: + - project: 'iopsys/gitlab-ci-pipeline' + file: '/static-code-analysis.yml' + ref: '1.2' + +# override original, because we cannot compile here +# because this is a kernel module and kernel headers +# are not available in the docker image +run_static_code_analysis: + image: ${COMMON_IMAGE} + stage: static_code_analysis + allow_failure: false + script: + - /usr/local/pmd/bin/run.sh cpd --language c --exclude ./test/ ${CPD_OPTIONS} --files ${SOURCE_FOLDER} + - flawfinder --minlevel 4 --error-level=4 ${FLAWFINDER_OPTIONS} ${SOURCE_FOLDER} + rules: + - if: $SOURCE_FOLDER + when: always + artifacts: + when: on_failure + paths: + - report.txt + +stages: + - static_code_analysis