Hello,
When scanning Swift code written using Xcode 16, Swift scanner fails to analyze the code resulting in “Parse error” code smells.
This is our SonarQube setup:
- SonarQube Enterprise Edition Version 9.9 (build 65466)
- Swift Code Quality and Security 4.8.0.5759 (swift)
- how is SonarQube deployed: Docker
Swift 6 introduces “internal import” declaration part of SE-0409. Additionally Xcode 16 produces build time warnings to replace “@_implementationOnly import” with “internal import”. When using “internal import” Swift scanner produces errors during scanning and reports “Parse error” code smells.
ERROR String is not parsed (file Example.swift, line 9)
1: //
2: // Example.swift
3: // ProjectName
4: //
5: // Copyright 2024 Author. All rights reserved.
6: //
7:
8: import Foundation
9: internal import CoreComponents
^
11: import UIKit