sonarlint-visualstudio icon indicating copy to clipboard operation
sonarlint-visualstudio copied to clipboard

Support //NOSONAR

Open rita-gorokhod opened this issue 4 years ago • 2 comments

Description

NOSONAR provides a way for the user to suppress issues in the IDE before they're raised on SQ/SC. It is not currently supported in SLVS and it's a functionality gap, as it is supported in other SL flavors. See community request.

TODO:

  • [ ] Support //NOSONAR for C/C++/JS/TS languages.

rita-gorokhod avatar Jun 04 '21 07:06 rita-gorokhod

Please open a new issue to track a related request: to be able to suppress individual Sonar warnings in a C family source file. Something like // NOSONAR(cpp:S106). Some considerations include whether the suppression lasts only for the immediate statement which follows, or whether it remains in effect for the remainder of that source file. If the latter case, a corresponding comment form that could re-enable the warning would be helpful.

Mike4Online avatar Jun 15 '21 14:06 Mike4Online

@rita-sonarsource usually nosonar is supported on the analyzer side. In CFamily we don't believe it is the right approach for issues suppression so we don't support it(even for CLion and VS Code). After the last discussion with @marco-comi-sonarsource there is a plan to support proper issue suppression at some point. So i would suggest remocing c&c++ from this ticket.

AbbasNS avatar Apr 06 '22 17:04 AbbasNS