【问题标题】:Running PVS-Studio on a C# project on Linux gives weird output file formatRunning PVS-Studio on a C# project on Linux gives weird output file format
【发布时间】:2022-12-01 14:17:02
【问题描述】:

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:

which does not seem correct.

【问题讨论】:

    标签: c# linux pvs-studio


    【解决方案1】:

    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, runpvs-studio-dotnetthe 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
    

    【讨论】:

    • This has worked, thank you
    【解决方案2】:

    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.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-07-15
      • 2014-11-17
      • 2021-02-06
      • 2018-06-08
      • 1970-01-01
      • 1970-01-01
      • 2022-12-28
      相关资源
      最近更新 更多