Skip to content
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
2 tasks done
jpsim opened this issue Jan 17, 2019 · 0 comments
Closed
2 tasks done

False positive in identical_operands rule #2564

jpsim opened this issue Jan 17, 2019 · 0 comments
Labels
bug Unexpected and reproducible misbehavior.

Comments

@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.
@marcelofabri marcelofabri added the bug Unexpected and reproducible misbehavior. label Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

No branches or pull requests

2 participants