Поддержка PVS-Studio

This commit is contained in:
Andrei Astafev 2022-04-07 10:18:59 +03:00
parent b7a4f7f8c1
commit befdf4a4e0
2 changed files with 20 additions and 0 deletions

View File

@ -32,3 +32,7 @@ check-format-sources:
only:
- merge_requests
extends: .check-format-sources
analyze-pvs:
when: manual
extends: .analyze-pvs

View File

@ -144,3 +144,19 @@ variables:
${CHECK_FORMAT_SOURCES_CMD}
fi
.analyze-pvs:
variables:
CMAKE_GENERATOR: Ninja
image: jammy-dev
tags: ['analyze']
script:
- >
if [ -n "${CUSTOM_ANALYZE_PVS}" ]; then
${CUSTOM_ANALYZE_PVS}
else
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build .
cmake --build build -j
pvs-studio-analyzer analyze -f build/compile_commands.json -j
plog-converter -a "GA:1,2,3;64:1;OP:1,2;CS:1,2" -t errorfile PVS-Studio.log
fi