Problem when PR has less than 20 new LOCs

Hi teams,

I am using Sonarcloud to ensure my company code. I use default quality gate with 80% code coverage need to be done. Then i get caught of this problem which really miss our expectations of the analysis:
When we create a new PR with 16 new lines of code, sonarcloud said that the number of new LOC is too small so they do not scan as “Some Quality Gate conditions on New Code were ignored because of the small number of New Lines”
However, when we merge the PR into master, the analysis for master branch said that it’s fail due to code coverage
I really believe that if we merge an accepted branch into master, master branch must pass the quality gate too.


Thanks for reaching out about this.

If you’re interested in the history of why we have this 20-line threshold, you can check out SONAR-9352.

We recognize there are some cases where this isn’t ideal, and I’d encourage you to vote for SONAR-10485 - Provide a way to configure the Quality Gate fudge factor


1 Like

Thanks Colin,

I already vote for Sonar-10485. Wish you can suply the solution soon.