Ignore duplication and coverage on small changes should apply to uncovered lines no total lines

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) Sonarqube 9.9 , community license
  • how is SonarQube deployed: zip, Docker, Helm NA
  • what are you trying to achieve:
  • what have you tried so far to achieve this

ignore duplication and coverage on small changes should apply to uncovered lines not to total lines. Its quite confusing use the total lines for something that is not taking into account that lines (white spaces, curly-braces, comments).

I have an example with 25 lines in total, just 3 lines to cover, and it fails because of the change is not small enough.

Due to duplications and coverage use the number of uncovered lines, this number should be whatever you consider but for uncovered lines, not total new lines.

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hi,

I’m a bit confused. Are you saying that when duplication and coverage Quality Gate conditions are ignored on small changes the lines metric shouldn’t be used for the test? We agree, but have never gotten around to fixing it

SONAR-11283 Quality Gate should not fail when too few lines to cover

Unfortunately, I can’t find a parallel ticket for duplications.

 
HTH,
Ann