Is there a way to skip specific method in sonar-scanner without using ignore block?

Hi,

There’s not a good, language-agnostic way to do this. Nor is there a Java-specific way.

However, if you can configure your generation so that all the genned methods are added at the bottom of the file, then the Ignore Issues in Blocks method should work for you. Configure @generated as the start of the block and leave the end marker empty, and according to the docs

If the first regular expression is found but not the second one, the end of the file is considered to be the end of the block.

 
HTH,
Ann

3 Likes