0

How is it possible to make sonarqube take into account directives found in code comments? There is a page on Istanbul describing how to ignore some branches using comments like this

/* istanbul ignore if  */
if (hardToReproduceError)) {
    return callback(hardToReproduceError);
}

(see https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md)

It works well into HTML reports generated by Istanbul but it does not work with Sonarqube.

Sanket Shah
  • 2,888
  • 1
  • 11
  • 22
Anthony C.
  • 21
  • 2

1 Answers1

1

Indeed this is not supported by the SonarQube platform, so currently it is not possible to ignore reported uncovered line.