Ignore Issues in Blocks not working

In one of our sub-projects, we have defined patterns for ignoring issues in blocks as follows:

Start of block:

End of block:

The intent is to use it as follows:

// @sonarcloud SKIP_COVERAGE
   (untested code here)
// @sonarcloud END_SKIP_COVERAGE

This still reports on test coverage for the block, which is not expected behavior.

Are we misunderstanding how to use this feature?



Yes, you are misunderstanding the feature.

Ignoring blocks within a file is available for issues, but nothing else. Coverage exclusions only work at the file level.