New Swift Analyzer with support Swift 6.2, SwiftUI and 22 SAST rules

Hello Mobile Developers,

I am very happy to share that after several months of hard work, we have finally released a brand new version of our Swift analyzer. This is a complete rework of the engine.

We have also gone through all the problems and bugs you reported over the last few months. I’m happy to say they are fixed in this version. I am really looking forward to getting your feedback on how it performs on your projects now.

Support for Swift 6.2 and future versions

The analyzer now supports Swift 6.2. One of the biggest changes is that we now rely directly on the native Swift compiler to do our analysis. This is a big win for the future: it means that whenever a new version of Swift is released, we will be able to support it quickly.

Support of SwiftUI

The analyzer understands SwiftUI code much better now. It will raise only relevant issues instead of trying to apply generic Swift rules to code that represents UI. Also, the analyzer won’t raise anything on your Preview sections anymore. We know that no one wants to spend time making these helpers “top quality” because they are only used during the dev phase to check the look and feel.

New Security Rules (SAST)

We have also put a lot of focus on security. We added new SAST rules specifically for Swift. In total, there are now 22 security rules available to help you find vulnerabilities in your code.

Where to find it?

These changes are already available on SonarQube Cloud and are included in SonarQube Server 2025.6.

Please give it a try and let us know what you think. Your feedback is very important for us to keep improving.

Alex

2 Likes