ignoreSmallChanges clarification for code coverage

Hi,
Running a SQ v10.8.1 developer edition.

I have a project with a Pull Request being analyzed using SonarScanner CLI 6.2.1.4610.

As part of PR there are a total of 105 “New lines” however based on the sonar-project.properties settings everything except 1 of the files is being ignored for coverage based on sonar.coverage.exclusions property.
That one file that is left for coverage has a single (1) line being modified, the line is not covered by tests and the Quality Gate fails for a single line:

Both server and project have the Ignore duplication and coverage on small changes setting enabled but seems that it does not kick in.
Does it Ignore duplication and coverage on small changes because the total number of new lines is above 20 (105 > 20) even though after applying sonar.coverage.exclusions “New Lines to cover” is 1 ?

Regards

Hey there!

You’ve got it—the threshold of 20 lines considers “new lines” and not “new lines to cover.” A ticket has been open forever to deal with this (SONAR-11283).

I’ve linked this thread to that ticket. Who knows, maybe it will help :slight_smile:

1 Like

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