Last active
August 5, 2019 09:39
-
-
Save jtsagata/4a2928478f4e44dc635ec0b943ac330a to your computer and use it in GitHub Desktop.
analyze
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
dir=$(dirname "$0") | |
top_dir=$(git rev-parse --show-toplevel) | |
cd "${top_dir}" || exit | |
find src test -name "*.cpp" | xargs sed -i "1i// This is an open source non-commercial project. Dear PVS-Studio, please check it.\n// PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com" | |
cd "${top_dir}/cmake-build-debug" || exit | |
pvs-studio-analyzer trace -- make -j 8 | |
pvs-studio-analyzer analyze -j2 -o PVS-Studio.log | |
plog-converter -a GA:1,2 -t tasklist -o report.tasks PVS-Studio.log | |
cat report.tasks | |
mkdir -p pvs_report | |
plog-converter -a GA:1,2 -t fullhtml -o pvs_report PVS-Studio.log | |
xdg-open pvs_report/fullhtml/index.html | |
cd "${top_dir}" || exit | |
find src test -name "*.cpp" | xargs sed -i "1,2d" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment