Skip to content

SwiftLint analyzer choking on Xcode 14 build log #4208

Description

@AntoineChwat

New Issue Checklist

Describe the bug

When applying the rule unused_import, the swiftlint analyzer chokes then reports no errors, even though there clearly are errors in the code.

Complete output when running SwiftLint, including the stack trace and command used
$ xcodebuild -workspace <WORKSPACE>.xcworkspace -scheme <SCHEME> -destination "platform=iOS Simulator,id=<ID>" clean build > build.log
$ swiftlint analyze --compiler-log-path build.log

Environment

  • SwiftLint version: 0.49.1
  • Installation method used: Homebrew
  • Paste your configuration file:
analyzer_rules:
  - unused_import
  • Are you using nested configurations? No
  • Which Xcode version are you using (check xcodebuild -version)? Xcode 14.0; Build version 14A309

I have several files with clear violations of the rule (that I added myself, just to make 100% sure), but this is the output I get from running swiftlint:

Analyzing Swift files in current working directory
Analyzing '<FILENAME_1.swift' (1/596)
sourcekit: [1:getCursorInfo:10755: 0.0000] error creating ASTInvocation: error: unknown argument: '-use-frontend-parseable-output'
Could not get cursor info
sourcekit: [1:getCursorInfo:10759: 0.0004] error creating ASTInvocation: error: unknown argument: '-use-frontend-parseable-output'
Could not get cursor info
....
sourcekit: [1:getCursorInfo:11067:21.6235] error creating ASTInvocation: error: unknown argument: '-use-frontend-parseable-output'
Could not get cursor info
sourcekit: [1:getCursorInfo:11071:21.6237] error creating ASTInvocation: error: unknown argument: '-use-frontend-parseable-output'
Could not get cursor info
sourcekit: [1:getCursorInfo:11075:21.6238] error creating ASTInvocation: error: unknown argument: '-use-frontend-parseable-output'
Could not get cursor info
Done analyzing! Found 0 violations, 0 serious in 596 files.

Closest issue I could find was this one when Xcode 12 came out

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnexpected and reproducible misbehavior.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions