When I use unused_declaration, static dependencies are not displayed
Open
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
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
Describe the bug
A clear and concise description of what the bug is.
Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint analyze --compiler-log-path xcodebuild.log
Environment
- SwiftLint version (run
swiftlint versionto be sure)? - 0.50.0-rc.2
- Installation method used (Homebrew, CocoaPods, building from source, etc)?
- portable_swiftlint
- Paste your configuration file:
analyzer_rules:
- unused_declaration
- Are you using nested configurations?
If so, paste their relative paths and respective contents. - Which Xcode version are you using (check
xcodebuild -version)? - Xcode 14.0.1
- Build version 14A400
public enum L10n {
public enum AccountSettings {
public static var account: String { return L10n.tr("App", "account_settings.account") }
}
...
}
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 by reproducing the reported case with swiftlint analyze --compiler-log-path xcodebuild.log and the unused_declaration analyzer rule enabled. Inspect the analyzer behavior around the provided nested L10n declarations and determine why static dependencies are omitted. Done means the relevant static dependencies are displayed while analyzing the example configuration and compiler log.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100