Warning when ingesting phpstan report with no issues

SonarQube Community Edition - Version 9.6 (build 59041)

I have configured a project with the sonar.php.phpstan.reportPaths third-partie issue config, and when ingesting a valid file with no issues ({"totals":{"errors":0,"file_errors":0},"files":[],"errors":[]}) SonarQube displays a warning on the project:

An error occurred when reading report file ‘/path/to/project/reports/phpstan.json’, no issue will be imported from this report.
The content of the file probably does not have the expected format.

Is this expected or is there an error with the way this file is handled?

Hello @randomuser,

Welcome to the community. I can confirm, that the analyzer generates an error when importing PHPStan reports which do not contain any issues. This should not be the case, so I have created a ticket. We will address it in the next iteration. Thanks for your contribution.


1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.