Skip to content

Instantly share code, notes, and snippets.

@GermanAizek
Last active August 18, 2024 22:30
Show Gist options
  • Save GermanAizek/eea8a6f20446f91a8c736d5b43eb5d3e to your computer and use it in GitHub Desktop.
Save GermanAizek/eea8a6f20446f91a8c736d5b43eb5d3e to your computer and use it in GitHub Desktop.
PVS Studio analyze Makefile or Ninja script on Linux
# configure project (CMake or Meson)
# building with trace (Makefile)
pvs-studio-analyzer trace -- make -j8
# building with trace (Ninja)
pvs-studio-analyzer trace -- ninja
# analyze strace_out or compile_commands.json (Makefile)
pvs-studio-analyzer analyze -j8 --intermodular -a "GA;64;OP" -o PVS.log # CLion and Visual Studio
# analyze strace_out or compile_commands.json (Ninja)
pvs-studio-analyzer analyze -f strace_out -j8 --intermodular -a "GA;64;OP" -o PVS.log # CLion and Visual Studio
# convert report format file
plog-converter -t json -a 'GA;64;OP' -o PVS.json PVS.log # QtCreator
# open PVS.log in IDE (CLion and Visual Studio)
# open PVS.json in IDE (Qt Creator)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment