Swift Protocol Analysis

  • What language is this for? Swift

  • Which rule? swift:S2962 and swift:S4144

  • Why do you believe it’s a false-positive/false-negative? Fields within a protocol must be defined with get/set.

  • Are you using: SonarQube Cloud

    • How can we reproduce the problem? Give us a self-contained snippet of code (formatted text, no screenshots)

      protocol Foo {

      var bar: String { get set }

      var bar2: String { get set }
      }

Has something changed around how analysis is performed? Our issues jumped from 115~ to over 700 between two runs:

Hi,

In fact, we released a completely re-written Swift analyzer.

I’m going to flag this for the language experts.

 
Ann

Hello @LewisOxbury ,

First of all thank you for the feedback.

FYI fixes for the false-positives in swift:S2962 and swift:S4144 will be deployed to SonarQube Cloud next week.

1 Like