1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

Fix cppcheck invocation

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel 2024-02-29 20:04:53 +01:00
parent 4db21c6ec2
commit 5244d9aec0
3 changed files with 32 additions and 24 deletions

View file

@ -103,30 +103,7 @@ test:python:
test:cppcheck:
stage: test
script:
- cppcheck -j $(nproc)
--max-configs=32
--error-exitcode=1
--quiet
--inline-suppr
--enable=warning,performance,portability,missingInclude
--std=c++11
--suppress=noValidConfiguration
-U '_MSC_VER;_WIN32;_M_ARM'
-U '_MSC_VER;_WIN32;_M_AMD64;_M_X64'
-U '_MSC_FULL_VER;_MSC_VER'
-U '_MSC_BUILD;_MSC_VER'
-I include
-I common/include
src/
lib/
common/lib/
common/tests/unit/
tests/unit/
fpga/gpu/
fpga/src/
fpga/lib/
fpga/tests/unit/
| tee cppcheck.log
- ./tools/run-cppcheck.sh | tee cppcheck.log
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
tags:
- docker

View file

@ -163,6 +163,7 @@
libgit2
pcre
reuse
cppcheck
];
in rec {
default = full;

30
tools/run-cppcheck.sh Executable file
View file

@ -0,0 +1,30 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
# SPDX-License-Identifier: Apache-2.0
cppcheck -j $(nproc) \
--max-configs=32 \
--error-exitcode=1 \
--quiet \
--inline-suppr \
--enable=warning,performance,portability,missingInclude \
--std=c++11 \
--suppress=noValidConfiguration \
-U '_MSC_VER;_WIN32;_M_ARM' \
-U '_MSC_VER;_WIN32;_M_AMD64;_M_X64' \
-U '_MSC_FULL_VER;_MSC_VER' \
-U '_MSC_BUILD;_MSC_VER' \
-I include \
-I common/include \
-I fpga/include \
-I fpga/gpu/include \
src/ \
lib/ \
common/lib/ \
common/tests/unit/ \
tests/unit/ \
fpga/gpu/src \
fpga/gpu/lib \
fpga/src/ \
fpga/lib/ \
fpga/tests/unit/