Idean/sonar-swift

ERROR: Failed to parse SwiftLint report file

Opened this issue · 0 comments

New Issue Checklist

Issue Description

Hi, I have a problem with swiftlint. I use Fastlane.
Here is my lane :

swiftlint(
      path: "../",
      output_file: "reports/swiftlint.txt",
      ignore_exit_status: true,
      config_file: "../.swiftlint.yml"
    )
    
    sonar

My Fastfile is placed in the /ci folder. Then the swiftlint.txt is situated in the ci/reports/ folder.

A extract of my swiftlint.txt :

/Users/user/Documents/Man/man/Models/MPKeyConstant.swift:10:1: warning: Type Body Length Violation: Type body should span 300 lines or less excluding comments and whitespace: currently spans 353 lines (type_body_length)
/Users/user/Documents/Man/man/Pods/JTAppleCalendar/Sources/JTAppleCalendarView.swift:110:28: warning: Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)
...

When i launch the lane, i have the error :

ERROR: Failed to parse SwiftLint report file
[12:16:20]: ▸ java.nio.file.NoSuchFileException: ci/reports/swiftlint.txt

I don't know why because my sonar-project.properties seems to be correct.

# Path to source directories 
sonar.projectBaseDir=../
sonar.sources=.
sonar.swift.swiftlint.report=ci/reports/*swiftlint.txt

Thank you for your help