From befdf4a4e0f9af30dafd645b3a5c04327231385c Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Thu, 7 Apr 2022 10:18:59 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6?= =?UTF-8?q?=D0=BA=D0=B0=20PVS-Studio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml.example | 4 ++++ scheduled.yml | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/.gitlab-ci.yml.example b/.gitlab-ci.yml.example index 40a9a8d..00da56c 100644 --- a/.gitlab-ci.yml.example +++ b/.gitlab-ci.yml.example @@ -32,3 +32,7 @@ check-format-sources: only: - merge_requests extends: .check-format-sources + +analyze-pvs: + when: manual + extends: .analyze-pvs diff --git a/scheduled.yml b/scheduled.yml index a400d59..ec17809 100644 --- a/scheduled.yml +++ b/scheduled.yml @@ -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 +