New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positives when using identical_operands with nested array #2467

konomae opened this Issue Nov 19, 2018 · 2 comments


None yet
4 participants
Copy link

konomae commented Nov 19, 2018

New Issue Checklist

Describe the bug

False positives when using identical_operands with nested array.
SwiftLint 0.28.1


  - identical_operands


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.


  • 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:
  - identical_operands

@realm-probot realm-probot bot added the O:User label Nov 19, 2018

@marcelofabri marcelofabri added the bug label Nov 19, 2018


This comment has been minimized.

Copy link

xavierLowmiller commented Jan 10, 2019

I have another false positive that might be related:

let isLowercase = string == string.lowercased()

Will open a PR momentarily.


This comment has been minimized.

Copy link

jpsim commented Jan 17, 2019

Fixed in 0.29.4.

@jpsim jpsim closed this Jan 17, 2019

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