Skip to content

unused_import seems to work only for public imports #6620

Closed

Description

@rgoldberg

New Issue Checklist

Bug Description

unused_import seems to work only for public imports.

If correct, it should either be fixed to work for all imports, or be documented as only working for public imports.

internal import Foundation // does not trigger a violation

zsh:

swiftlint analyze --compiler-log-path =(xcodebuild -scheme myscheme -destination "platform=macOS,arch=$(arch),variant=macos" 2>&1)

Environment

  • SwiftLint version: 0.63.2
  • Xcode version: Xcode 26.4.1 / Build version 17E202
  • Installation method used: Homebrew
  • Configuration file:
analyzer_rules:
- unused_import

Are you using nested configurations? No

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions