realm / realm/SwiftLint

When I use unused_declaration, static dependencies are not displayed

Open
#4,478 2 comments 0 reactions 0 assignees View on GitHub

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
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 version to 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.