Search code examples
c#linuxpvs-studio

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


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.


Solution

  • 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