This section covers converting logs for Windows. Converting logs for Linux and macOS is described in the document "How to run PVS-Studio on Linux and macOS".
The analysis results that PVS-Studio generates as its output after it has finished checking a project (either from the Visual Studio plugin or in command-line batch mode) are typically presented as an XML log file (".plog"). Using direct integration of C++ analyzer to the build system to perform the analysis produces an unparsed 'raw' log file. You can view these files in the PVS-Studio plugin for Visual Studio or in the C and C++ Compiler Monitoring UI (Standalone.exe). These formats, however, are not convenient for viewing directly in a text editor, sending them via email, and so on. The PVS-Studio distribution includes, among other things, the PlogConverter utility, which allows you to convert analysis results to other formats.
When opening log file in a text editor, a user has to deal with XML markup or 'raw' unreadable log from the analyzer. To convert the analysis results into a more convenient format, use PlogConverter utility, which comes with PVS-Studio and can be found in the PVS-Studio installation directory ("C:\Program Files (x86)\PVS-Studio" by default). You can also download the source code of the utility.
Use the "--help" option to display the basic information about the utility:
PlogConverter.exe --help
Let's take a closer look at the utility's parameters:
You can combine different format options by separating them with "," (no spaces), for example:
PlogConverter.exe D:\Projct\results.plog --renderTypes=Html,Csv,Totals
or
PlogConverter.exe D:\Projct\results.plog -t Html,Csv,Totals
MessageType:MessageLevels
"MessageType" can be set to one of the following types: GA, OP, 64, CS, MISRA, Fail
"MessageLevels" can be set to values from 1 to 3
You can combine different masks by separating the options with ";" (no spaces), for example (written in one line):
PlogConverter.exe D:\Projct\results.plog --renderTypes=Html,Csv,Totals
--analyzer=GA:1,2;64:1
or
PlogConverter.exe D:\Projct\results.plog -t Html,Csv,Totals -a GA:1,2;64:1
The command format reflects the following logic: convert ".plog" into Html, Csv, and Totals formats, keeping only the general-analysis warnings (GA) of the 1-st and 2-nd levels and 64-bit warnings (64) of the 1-st level.
PlogConverter.exe D:\Projct\results.plog --renderTypes=Html,Csv,Totals
--excludedCodes=V101,V102,V200
or
PlogConverter.exe D:\Projct\results.plog -t Html,Csv,Totals -d V101,V102,V200
The PlogConverter utility defines several non-zero exit codes, which do not necessarily indicate some issue with the operation of the tool itself, i.e. even when the tool returns something other when zero it does not always mean that the tool has 'crashed'. Here's the description of all possible exit codes, that PlogConverter can return.
The PVS-Studio distribution includes the BlameNotifier tool, which allows you to notify developers who have committed code in the repository that triggered analyzer warnings. You can also configure notifications about all detected warnings for a specific group of people (this can be useful, for example, for managers and team leads).
The following documentation section describes the ways how to use the BlameNotifier tool: "Notifying the developer teams (blame-notifier utility)".
Note. The blame-notifier tool is available only if you have an Enterprise license. To order the license, please, write to us.