C++ equivalent to @SuppressWarnings("squid:S1197")

cpp
sonarcfamily

(Jennifer Pimm) #1

I’m trying to find a way to suppress warnings on individual lines/blocks of code in C++. I found ways to suppress warnings in JAVA but they don’t work in C++. //NOSONAR works but I don’t want to block all warnings for the line, just specific ones. So far I’ve tried
#pragma warning disable S364
#pragma warning(suppress: S34)
//cppcheck-suppress cpp:S3654
None have worked.
I am using sonarqube version 6.7.5
Thanks


(Massimo Paladin) #2

Hi @Jennifer_Pimm,

I would suggest you to use SonarQube UI to mark issue as Resolve as won't fix instead of using // NOSONAR, we don’t support any other way of ignore issues in C++ and at the moment we don’t plan to.


(Jennifer Pimm) #3

Okay, thank you.