How to ignore some statements in Javascript code coverage when using lcov and istanbul?

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 somуерштп using comments like this
/* istanbul ignore next: private method */

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

SonarQube Version 8.3.1 ( Developer Edition)

1 Like

I am also running into this issue. If I put /* istanbul ignore file */ at the top of a file, it will not be listed in the generated lcov.info file, but Sonar will still count it as requiring coverage.