Sonar scanner for c does not detect bugs in master branch

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this

Hi, I am using sonarqube developer edition 7.9.x.
We have a existing project, we are analysing through sonarqube.
When analysis is done for master branch report does not indicate any bugs, but when a PR is created, the PR analysis shows bugs on non changed part of code in the file. because file has changes it is analysed again and bugs are reported on already existing code.
We tried to run sonar scan on master branch still it did not show already existing bug.

Can anybody help me understand why master branch analysis does not report bug, but a PR analysis reports bugs on already existing code.


Welcome to the community!

It sounds like the root of the problem is in the analysis of your main branch. Maybe start by sharing those analysis logs, code-formatted (``` on the line before and on the line after)?