From 95e1c9792f2a6e32a8ba9e46bd5b231561848c8d Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Tue, 20 Jul 2021 22:03:02 +0200
Subject: [PATCH] TST: check code style in pipeline

---
 .gitlab-ci.yml | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8a53abc..63513c3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -55,7 +55,7 @@ build-testenv:
 
 
 # Formatting with miss_hit
-code_style:
+code_style_octave:
   tags: [ docker ]
   stage: test
   script:
@@ -63,6 +63,13 @@ code_style:
     - mh_style --octave ./src ./doc
   allow_failure: true
 
+code_style_cpp:
+  tags: [ docker ]
+  stage: test
+  script:
+    - clang-format-11 --dry-run --verbose --Werror $(find test/ src/ -type f -iname "*.cpp" -o -iname "*.h" -o -iname "*.h.in")
+  allow_failure: true
+
 # Unit tests
 test:
   tags: [ docker ]
@@ -71,12 +78,14 @@ test:
     - octave -v
     - make test
 
+# Linting with miss_hit
 linting_octave:
   tags: [ docker ]
   stage: test
   script:
     - mh_lint --octave ./
 
+# linting with clang-tidy and include-what-you-use
 linting_cpp:
   tags: [ docker ]
   stage: test
-- 
GitLab