Merge pull request #13266 from jamessan/pvs-check

This commit is contained in:
James McCoy 2020-11-10 12:59:05 -05:00 committed by GitHub
commit a4fea2884d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

@ -346,7 +346,7 @@ patch_sources() {(
if test "$only_build" != "--only-build" ; then
find \
src/nvim test/functional/fixtures test/unit/fixtures \
-name '*.c' \
\( -name '*.c' -a '!' -path '*xdiff*' \) \
-exec /bin/sh -c "$sh_script" - '{}' \;
fi
@ -363,11 +363,17 @@ run_analysis() {(
cd "$tgt"
if [ ! -r PVS-Studio.lic ]; then
pvs-studio-analyzer credentials -o PVS-Studio.lic 'PVS-Studio Free' 'FREE-FREE-FREE-FREE'
fi
# pvs-studio-analyzer exits with a non-zero exit code when there are detected
# errors, so ignore its return
pvs-studio-analyzer \
analyze \
--lic-file PVS-Studio.lic \
--threads "$(get_jobs_num)" \
--exclude-path src/nvim/xdiff \
--output-file PVS-studio.log \
--file build/compile_commands.json \
--sourcetree-root . || true

View File

@ -1,7 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
//
//
#include "nvim/vim.h"
#include "nvim/extmark.h"
#include "nvim/decoration.h"

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// Helper program to exit and keep stdout open (like "xclip -i -loops 1").
#include <stdio.h>