[gimp/wip/Jehan/cppcheck] gitlab-ci: add an analysis stage with cppcheck code analysis stage.



commit 51f0db3b7bf0c26e2b155836826b35b33f14ccda
Author: Jehan <jehan girinstud io>
Date:   Tue Apr 28 18:39:32 2020 +0200

    gitlab-ci: add an analysis stage with cppcheck code analysis stage.
    
    As contributed by RafaƂ @qarmin in a Gitlab comment. See #5002.

 .gitlab-ci.yml | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 647a565e57..69d110b28d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,6 +3,7 @@ image: debian:testing
 stages:
   - dependencies
   - gimp
+  - analysis
 
 variables:
   GIT_DEPTH: "1"
@@ -341,3 +342,19 @@ gimp-win32:
     paths:
       - _build/
       - gimp-prefix/
+
+cppcheck:
+  stage: analysis
+  before_script:
+    - apt-get update
+    - apt-get install -y cppcheck
+  script:
+    - cppcheck -q -j8 --enable=all --force --output-file=cppcheck.xml --xml --xml-version=2 .
+    - mkdir report
+    - cppcheck-htmlreport --source-dir=. --title=gimp --file=cppcheck.xml --report-dir=report
+  artifacts:
+    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+    expire_in: 1 week
+    when: always
+    paths:
+      - report


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]