Skip to end of metadata
Go to start of metadata

NOTE This feature requires SQ 7.2+ and SonarSwift 4.0+.

Import of SwiftLint Reports

SonarSwift allows to import into SonarQube/SonarCloud issues generated by SwiftLint. SonarSwift consumes the JSON output format produced by SwiftLint.

Please refer to the SwiftLint documentation to know how to generate the issues reports in the JSON format. In version 0.27, the following command was supported:

swiftlint lint --reporter json > swiftlint.json

Once you have the JSON report generated, you need to feed the property sonar.swift.swiftLint.reportPaths inside the sonar-scanner configuration file. This property accepts one or more SwiftLint report paths. The paths to report files should be absolute or relative to the project base directory.

sonar.swift.swiftLint.reportPaths=./swiftlint.json
  • No labels