Azure Devops (GitHub repository) + SonarCloud = No issues found in Pull Requests

I’ve setup a simple CI pipeline with Azure Devops (Prepare -> Run -> Publish). When pushing directly to the master branch code is properly analyzed. However when a pull request is analyzed, the worker reports issues (see Run Code Analysis log: but they’re not visible on SonarCloud, I get the “No issues.” message (see:
The strange part is that Sonar detects 4 changed lines in the Code tab but no changes in Measures tab.

How do I make it work?

Hey Jakub,

You’ll note that the file cannot be parsed, which is not an issue that will be reported on SonarQube. SonarQube can’t analyze the file because… it can’t parse it.

I would remove your invalid syntax (line 21, “n o t ph p c o d e”) and try again.



Thanks for the answer. I added this part because earlier Sonar wouldn’t pickup stuff I left there intentionally either (unused variables and wrong code formatting). Now I reverted the code to mentioned state and the issue still persists. Please see: and

You’ve elected to use a very small Quality Profile (which defines the rules applied to a project), “PSR-2”, try using the default Sonar Way. :slight_smile:


1 Like

Wow! This worked, thank you! There should be a big red warning that the PSR2 code check most probably isn’t what the user wants :slight_smile: