In our code, there are quite a lot of logging fragments like this:
if(logger.isDebugEnabled()) {
logger.debug("...")
}
Is it possible to configure SonarQube so that such code blocks are not included in the code coverage analysis? Writing tests to cover such debug statements does not seem to make much sense...
I found out how to:
- ignore entire files from coverage analysis
- ignore issues in code blocks
But I did not find a way of excluding a code block from the coverage analysis only.