Swift 6 support

Swift 6 was released about a month ago and according to the language matrix, there isn’t support for Swift 6 yet, with only partial support for Swift 5.9 and full support for 5.8 and older. SonarCloud is a key part of our build pipeline - so is there a roadmap available for when support for the latest version will be added, to help guide our own timelines to update our applications to Swift 6?

1 Like

Hi Darrell,

Thanks for bringing this up, and welcome to the Sonar Community.

We have planned work on the remaining parts of Swift 5.9 and Swift 6.0 for this quarter.

However, there are complex new semantics, and there is some risk that we will not fully support both this year. We’ll do our best to unlock users like you so that you can use the latest version of Swift.

1 Like

thanks Gabriel! any updates on this?

Hi Gabriel

I was wondering if you have any update on Swift 6.0 support (and also 6.1 which was recently released).

Are there any new status updates on modern Swift support? As of today, applications must be submitted to Apple with Xcode 16, which means a minimum Swift version of 5.10. There is no version of Sonarqube that can successfully parse even Swift 5.10 syntax, and at our company that means a significant number of our files have parsing errors on what has become standard and best practice Swift syntax over the past few years.

We’ve also had to disable a large number of rules that do not work in a SwiftUI world due to the number of false positives. We’d continue to use this without issue if we could only use it for coverage data and import third-party analysis issues, but it seems that the static analysis and the coverage portions are tightly coupled, so we have no choice but to manually work around these issues until Sonarqube’s Swift support is brought up to date.

1 Like

any timelines for Swift 6 support would be greatly appreciated

or another thought: we turned on ‘Default Internal Imports’ in Build Setting section ‘Swift Compiler - Upcoming Features’, so we had to add a bunch of ‘public import’ statements in our code, but that’s breaks SonarQube parsing.
Is there a way to avoid parsing errors for ‘public import’?