Skip to content

unused_import false positives #3116

Closed
Closed
@AdrianBinDC

Description

New Issue Checklist

Describe the bug

I ran swiftlint analyze on a large project with autocorrect enabled for unused_imports. While swiftlint found a large amount of unused imports, the project didn't compile when I built after running swiftlint analyze. I stashed swiftlint's changes before making alterations to it. From there, I applied the stash and kept addressing compiler errors until I got the project to build. When I finished, I discovered despite the reduction in imports, the project took slightly longer to build when building after nuking derived data. When building WITH derived data, the build time was dramatically faster before removing imports than after.

Should I expect compile times to go down as a result of removing unused imports?

Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint
 Done linting! Found X violations, 0 serious in Y files.

Environment

  • SwiftLint version (run swiftlint version to be sure)?
    0.39.1
  • Installation method used (Homebrew, CocoaPods, building from source, etc)?
    Homebrew
  • Which Xcode version are you using (check xcodebuild -version)?
    Xcode 11.3.1
    Build version 11C504

Metadata

Assignees

No one assigned

    Labels

    wontfixIssues that became stale and were auto-closed by a bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions