False positives when using identical_operands with nested array #2467
Closed
Description
New Issue Checklist
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
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