Excluding the rule from working on particular methods is not something that we support.
However, if you’re using connected mode, you can suppress these particular issues and then you won’t see them in your IDE. Otherwise, you can disable the rule entirely.