Skip to content
Snippets Groups Projects
Commit 407bc411 authored by Tomáš Pecka's avatar Tomáš Pecka
Browse files

CI: Static analysis (clang-tidy, cppcheck)

parent 0ced73b9
No related branches found
No related tags found
1 merge request!86Dev tp
Pipeline #37675 passed with warnings
......@@ -20,7 +20,7 @@ stages:
- CMake/generate.py -wm
- mkdir release
- cd release
- cmake -DCMAKE_BUILD_TYPE=Release ..
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
- make -j $(grep -c processor /proc/cpuinfo)
artifacts:
paths:
......@@ -124,9 +124,35 @@ build:doc:
- doc/
expire_in: 1 day
 
#========== Stage test ==========
 
.static: &static
stage: test
image: amd64/debian:testing-slim
before_script:
- apt-get update
dependencies:
- build:debian:testing:clang
except:
variables:
- $SCHEDULED_NIGHTLY
allow_failure: true
static:cppcheck:
<<: *static
script:
- apt-get install -y cppcheck
- cppcheck -q --enable=all --project=release/compile_commands.json --suppress="*:*/contrib/*" -j$(grep -c processor /proc/cpuinfo) --error-exitcode=1
static:clang-tidy:
<<: *static
script:
- apt-get install -y clang-tidy
- apt-get install -y libxml2-dev libtclap-dev libreadline-dev qtbase5-dev graphviz-dev libjsoncpp-dev
- find . -wholename "*/src/*.cpp" -print0 | xargs -n1 -P$(grep -c processor /proc/cpuinfo) -0 clang-tidy -warnings-as-errors='*' -p release/
# ---
.test: &test
stage: test
script:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment