Skip to content

Rules explicit_self and unused_import interfere with each other #3020

Description

@gereons

New Issue Checklist

Describe the bug

I'm running swiftlint analyze with rules explicit_self and unused_import enabled in my project: https://github.com/gereons/SwiftLintBug1 (use the enclosed lint.sh to reproduce).

Expected result: swiftlint consistently reports the violations in all ten runs

Actual results vary. Most runs report Could not get cursor info twice, and find no violations. Some runs report Could not get cursor info once, and find explicit_self violations in one file. Rare runs do not report Could not get cursor info at all and correctly find violations in two files.

When either of the analyzer rules is commented out in the .yml, the remaining rule works correctly.

Swiftlint version: 0.38.1, installed via homebrew
Xcode version: 11.3

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

    bugUnexpected and reproducible misbehavior.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions