Skip to content
Snippets Groups Projects
Commit 19b8bd5b authored by Vivek Dutta's avatar Vivek Dutta
Browse files

Suppress error for clang addon

cppcheck clang is an experimental addition, which got crashed randomly
for now skipping error from cppcheck clang validator
parent f2979488
Branches
No related tags found
1 merge request!29Suppress error for clang addon
...@@ -28,6 +28,7 @@ generate_compilation_db() ...@@ -28,6 +28,7 @@ generate_compilation_db()
fi fi
exec_cmd bear -- make -C ${SOURCE_FOLDER} exec_cmd bear -- make -C ${SOURCE_FOLDER}
make -C ${SOURCE_FOLDER} clean
if [ ! -f "compile_commands.json" ]; then if [ ! -f "compile_commands.json" ]; then
log "Failed to generate compilation db" log "Failed to generate compilation db"
...@@ -47,7 +48,11 @@ run_cppcheck_validation() ...@@ -47,7 +48,11 @@ run_cppcheck_validation()
run_cppcheck_clang_validation() run_cppcheck_clang_validation()
{ {
if [ -f "compile_commands.json" ]; then if [ -f "compile_commands.json" ]; then
exec_cmd cppcheck --error-exitcode=1 --clang -i ./test --inline-suppr ${CPPCHECK_OPTIONS} --project=compile_commands.json if [ -n "${CI}" ]; then
cppcheck --error-exitcode=1 --clang -i ./test --inline-suppr ${CPPCHECK_OPTIONS} --project=compile_commands.json
else
exec_cmd cppcheck --error-exitcode=1 --clang -i ./test --inline-suppr ${CPPCHECK_OPTIONS} --project=compile_commands.json
fi
fi fi
} }
......
variables: variables:
COMMON_IMAGE: "dev.iopsys.eu:5050/iopsys/gitlab-ci-pipeline/code-analysis:1.0" COMMON_IMAGE: "dev.iopsys.eu:5050/iopsys/gitlab-ci-pipeline/code-analysis:1.1"
FLAWFINDER_OPTIONS: "" FLAWFINDER_OPTIONS: ""
CPD_OPTIONS: "--minimum-tokens 200" CPD_OPTIONS: "--minimum-tokens 200"
CPPCHECK_OPTIONS: "" CPPCHECK_OPTIONS: ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment