SonarQube - Turn off coverage for certain lines in Java

22 hours ago 3
ARTICLE AD BOX

I am using SonarQube and this is in the report:

enter image description here

It doesn't make sense it shows that annotation in the first place. I tried turning the coverage off with configuration and adding the comments, like:

sonar.issue.ignore.block=e2 sonar.issue.ignore.block.e2.beginBlockRegexp=@sonar-ignore sonar.issue.ignore.block.e2.endBlockRegexp=@end

That didn't work, below also doesn't work after adding it to a lombok.config file:

config.stopBubbling = true lombok.addLombokGeneratedAnnotation = true

Any suggestions? I have other blocks of code I also want to exclude. In the UI it doesn't seem like this is possible (my preference is in the code itself).

Read Entire Article