Skip to content

False positives when using identical_operands with nested array #2467

Closed
@konomae

Description

New Issue Checklist

Describe the bug

False positives when using identical_operands with nested array.
SwiftLint 0.28.1

.swiftlint.yml

whitelist_rules:
  - identical_operands

main.swift

Array<Array<Int>>()
Complete output when running SwiftLint, including the stack trace and command used
Loading configuration from '.swiftlint.yml'
Linting Swift files at paths 
Linting 'main.swift' (1/1)
/Users/user/swiftlint-test/main.swift:1:1: warning: Identical Operands Violation: Comparing two identical operands is likely a mistake. (identical_operands)
Done linting! Found 1 violation, 0 serious in 1 file.

Environment

  • SwiftLint version (run swiftlint version to be sure)? 0.28.1
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? cocoapods
  • Paste your configuration file:
whitelist_rules:
  - identical_operands

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