Running PVS-Studio on a C# project on Linux gives weird output file format

102 views Asked by At

The analysis of my C# project outputs a file in an (to me) unknown file format. I would like to convert the output of the analysis to fullhtml with plog-converter, but this tool does not understand the generated analysis output. The output looks like this (pastebin link).

I have setup both the pvs core and dotnet package. Running ./pvs-studio-dotnet -t ~/Desktop/pvs-test/pvs-test.csproj -o analysis -r seems to work, the exit code is 0. After converting the analysis output to fullhtml with plog-converter, the page looks like this:

enter image description here

which does not seem correct.

2

There are 2 answers

1
Kulikov Konstantin On BEST ANSWER

Unfortunately, plog-converter doesn't work with plog files. If you want to avoid this restriction, you can get the report in the json format. To do this, run pvs-studio-dotnet the following way:

pvs-studio-dotnet -t ~/Desktop/pvs-test/pvs-test.csproj -o analysis.json -r

As a result, you'll get the PVS-Studio report in the json format.

After that you can convert it into fullhtml:

plog-converter -t fullhtml -o ./fullhtml_folder analysis.json
0
Nick Lipilin On

Zero code means that the analyzer couldn't find anything suspicious in your code. Perhaps, that's because some diagnostic rules are disabled or you've marked existing warnings as false alarms. It seems like something is wrong with the plog-converter utility.