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 positive in identical_operands rule #2564

Closed
jpsim opened this Issue Jan 17, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@jpsim
Copy link
Collaborator

jpsim commented Jan 17, 2019

New Issue Checklist

Describe the bug

$ cat file.swift
let num: Int? = 0
_ = num != nil && num == num?.byteSwapped
$ cat .swiftlint.yml
included:
  - file.swift
whitelist_rules:
  - identical_operands
$ swiftlint version
0.29.4
$ swiftlint
Loading configuration from '.swiftlint.yml'
Linting Swift files at paths
Linting 'file.swift' (1/1)
/.../file.swift:2:19: warning: Identical Operands Violation: Comparing two identical operands is likely a mistake. (identical_operands)
Done linting! Found 1 violation, 0 serious in 1 file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment