Opensource Sonarqube version 9.0.1.46107 using Pull Request integration.
Our project is a mix of typescript and vue and we’re ignoring test coverage for the vue files.
We get PRs that are failed by the code coverage gate where only 2 lines of typescript code is changed and uncovered. The PRs usually have many changes to vue files, but as stated they are excluded from test coverage.
I had a look at the sonarqube source and the isSmallChangeSet
function is using the CoreMetrics.NEW_LINES_KEY
metric to determine whether the PR is smaller than the limit set by MAXIMUM_NEW_LINES_FOR_SMALL_CHANGESETS
.
In my opinion this is incorrect and it should rather use CoreMetrics.NEW_LINES_TO_COVER_KEY
.