Ignore line scanning

Hi,
I am using Sonarqube to scan our iOs Swift code, and I am getting some issues in the lines I want to ignore, but not sure what is going on.
It looks like that Sonar is scanning lines marked with //NOSONAR anyway.
Any solution for this?

Thanks
Igor

Hi,

Support of NOSONAR is actually implemented language-by-language, rather than being a core feature, and I don’t believe it has been implemented in Swift.

Depending on your situation, setting exclusions might help you.

Ann

To complement that, it’s only fair to remind that excluding specific lines here and there might prove quite costly in terms of maintenance over time. It’s fair to sometimes have to ignore an issue on a line, and in that case using the False-Positive/Won’t_Fix marking in SonarQube (with justification comment) will be a much smoother experience (automatically maintained/tracked as code evolves) also letting other rules catch (potentially severe) issues on that same line.

Hello,

Do you have any news about supporting NOSONAR for swift, at least supporting for Objective-C was added on Jan 17, 2020 :partying_face:

Hi,

No news about supporting NOSONAR in swift so far

Hi, Any update about this?

Hello, do you have update about supporting NOSONAR for swift

1 Like

Hi. Any updates regarding NOSONAR for swift?