Questions about SwiftLint Integration

Hi, I’m using SonarQube v9.9 and I have 2 questions regarding Swift Language support.
(FYI, I deployed the SonarQube by zip file)

  1. Does SonarQube show lint issues based on the sonar instance’s own settings? or the project’s “project.swiftlint.yml” settings? (If the former is correct, where do I configure it?)

  2. How to update swiftlint rules in case that I’m using project’s “project.swiftlint.yml” settings

Thank you in advance.

Hi,

You didn’t mention what edition you’re using. Swift support starts in Developer Edition($). If you have DE, you should be able to import SwiftLint reports using the sonar.swift.swoftLint.reportPaths analysis property.

 
HTH,
Ann

Hi,
I’m sorry that I missed the edition.
I’m using Enterprise Edition.

I think you misunderstood my questions.

  1. Does SonarQube show lint issues based on the sonar instance’s own settings? or the project’s “project.swiftlint.yml” settings? (If the former is correct, where do I configure it?)

→ I wonder the priorities of swiftlint rule application. Does sonar analysis apply each project’s configuration(project.swiftlint.yml)? or our sonar instance’s global settings apply first?

  1. How to update swiftlint rules in case that I’m using project’s “project.swiftlint.yml” settings
    → I wonder how to update each project’s swiftlint rules.

Thank you.

Regards,
Hyewon Lee

Hi Hyewon,

SonarQube imports your 3rd-party issues reports as-is. So this depends entirely on the setting you feed into the linter.

Sorry, I don’t understand the question.

 
Ann