Pvs-studio will return "Bad JSON" error when run

When I use a platformio.ini that looks like this or similar:
image
And then press “Inspect”, it will run through 90% of the analyzis and then fail with


Error. Which may be fine, as I don’t have a license and did not specify a path as proposed here in the docs.
Although this might not be a defect, I find it unclean and would expect a proper error message like “Error: please specify a license file” or similar.

I can reproduce this on my machine with the simplest of blink projects. Can anybody check if this is general behavior or if I made a mistake here? Thanks!

Hello @schallbert.

I just tried to reproduce the problem. It seems to occur when multiple code check tools are used. Including for non-valid ones, when used as:
check_tool = foo
or
check_tool = pvs-studio, foo

Opened an issue on GitHub: "Bad JSON" error in Inspect tab with multiple code check tools · Issue #3847 · platformio/platformio-core · GitHub

A single tool or the pio check command works fine.

1 Like