analyze finds 0 files in Xcode 26 build logs and reports success
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 19.7k
- Forks
- 2.3k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- I've Updated SwiftLint to the latest version.
- I've searched for existing GitHub issues.
Bug Description
swiftlint analyze finds no files in build logs produced by Xcode 26 and reports success:
$ xcodebuild -project App.xcodeproj -scheme "App" -destination generic/platform=iOS clean build > xcodebuild.log
$ swiftlint analyze --compiler-log-path xcodebuild.log
Done analyzing! Found 0 violations, 0 serious in 0 files.
$ echo $?
0
Xcode 26 passes the compiler arguments through @response files, so the log no longer contains the source file lists the log parser looks for:
SwiftDriver Sovran normal arm64 com.apple.xcode.tools.swift.compiler (in target 'Sovran' from project 'Sovran')
builtin-SwiftDriver -- /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -module-name Sovran -Onone @/Users/me/Library/Developer/Xcode/DerivedData/.../Sovran-OutputFileMap.json ...
The exit code 0 plus "0 violations" makes the breakage easy to miss: our CI lane kept reporting green while unused_declaration and unused_import had not run on a single file.
Things I tried:
- Building with
EMIT_FRONTEND_COMMAND_LINES=YES: the log then contains fullswift-frontendinvocations, but analyze still reports 0 files (the parser appears to only matchswiftcdriver lines). - Expanding the @response files inline into the log: analyze then finds the files, but SourceKit rejects the argument set, apparently over the explicit-modules flags - 35,000+
cursor info failed: Loading the standard library failederrors over the first 102 files, and no usable results.
Two candidate improvements, independently useful:
- Expand @response file references when extracting compiler arguments from the log (and/or accept
swift-frontendlines fromEMIT_FRONTEND_COMMAND_LINES=YES). - Exit non-zero, or at least warn loudly, when a compiler log yields 0 analyzable files - "Found 0 violations in 0 files" reads as a pass today.
Environment
- SwiftLint version: 0.65.0 (same behavior on 0.52.4)
- Xcode version: Xcode 26.6 (Build 17F113), macOS 26.6.2
- Installation method used: prebuilt binary (portable_swiftlint.zip)
- Configuration file: only
analyzer_rules: [unused_declaration, unused_import]is relevant; no nested configurations
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the swiftlint analyze --compiler-log-path entry point and the compiler-log parser that reads swiftc driver lines; reproduce the Xcode 26 log using the command shown in the issue. Compare handling of @ response files and swift-frontend lines, then verify that analysis discovers files and that a zero-file log no longer silently reports success.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100