- Operating system: Ventura 13.3.1
- SonarLint plugin version: v3.18.0
- Programming language you’re coding in: go
- Is connected mode used: No
//NOSONAR and // NOSONAR are not suppressing sonarlint problems on a line in VSCode. I also tried every variation of // (at symbol)Suppress() and (at symbol)SuppressWarnings().
Without just turning off a rule in the plugin all together how can I suppress individual warnings in go?
Thanks for your message. Could you, please provide us with a reproducer for the issue? In general
NOSONAR should work. However, there could be multiple reasons why it doesn’t.
First of all, we need a proper reproducer and analysis logs to investigate it. Also, have you tested it in SonarQube or SonarCloud?
About suppressing issues. Have you tried it with an argument that indicates the rule code like
SXXXX ? If yes and it still doesn’t work, could you, please, provide this reproducer too?
I have the same issue in GoLand, like this:
I checked in IntelliJ and GoLand. Looks like we don’t have enabled “NOSONAR” feature in some languages in SonarLint. I’ve created a ticket to fix it: