-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Rule request: Avoid Yoda conditions #1924
Labels
rule-request
Requests for a new rules.
Comments
Good rule, but definitely opt-in. |
dirtydanee
pushed a commit
to dirtydanee/SwiftLint
that referenced
this issue
Dec 2, 2017
This PR aims to implement [realm#1924][1]. [1]: realm#1924
dirtydanee
pushed a commit
to dirtydanee/SwiftLint
that referenced
this issue
Dec 2, 2017
This PR aims to implement [realm#1924][1]. [1]: realm#1924
dirtydanee
pushed a commit
to dirtydanee/SwiftLint
that referenced
this issue
Dec 3, 2017
This PR aims to implement [realm#1924][1]. [1]: realm#1924
dirtydanee
pushed a commit
to dirtydanee/SwiftLint
that referenced
this issue
Dec 18, 2017
This PR aims to implement [realm#1924][1]. [1]: realm#1924
dirtydanee
pushed a commit
to dirtydanee/SwiftLint
that referenced
this issue
Dec 18, 2017
This PR aims to implement [realm#1924][1]. [1]: realm#1924 (+1 squashed commit) Squashed commits: [b6a5af92] Updates changelog entry Moves entry to new section.
dirtydanee
pushed a commit
to dirtydanee/SwiftLint
that referenced
this issue
Dec 18, 2017
This PR aims to implement [realm#1924][1]. [1]: realm#1924
dirtydanee
pushed a commit
to dirtydanee/SwiftLint
that referenced
this issue
Dec 18, 2017
This PR aims to implement [realm#1924][1]. [1]: realm#1924 (+1 squashed commit) Squashed commits: [b6a5af92] Updates changelog entry Moves entry to new section.
dirtydanee
pushed a commit
to dirtydanee/SwiftLint
that referenced
this issue
Dec 18, 2017
This PR aims to implement [realm#1924][1]. [1]: realm#1924
dirtydanee
pushed a commit
to dirtydanee/SwiftLint
that referenced
this issue
Dec 18, 2017
This PR aims to implement [realm#1924][1]. [1]: realm#1924
dirtydanee
pushed a commit
to dirtydanee/SwiftLint
that referenced
this issue
Dec 18, 2017
This PR aims to implement [realm#1924][1]. [1]: realm#1924
dirtydanee
pushed a commit
to dirtydanee/SwiftLint
that referenced
this issue
Dec 18, 2017
This PR aims to implement [realm#1924][1]. [1]: realm#1924
dirtydanee
pushed a commit
to dirtydanee/SwiftLint
that referenced
this issue
Dec 18, 2017
This PR aims to implement [realm#1924][1]. [1]: realm#1924
Done in #1965 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
New Issue Checklist
Rule Request
the community thinks about this.
In Swift, you need a
var
orlet
keyword to do an assignment inside a condition (if
,guard
, etc).Thus, you only get the disadvantages of Yoda conditions, but no benefits.
Just the severity.
See README.md for guidelines on when to mark a
rule as opt-in.
I think this might cause some false positives, so I'd say opt-in. But it could be enabled by default if we can avoid those false positives.
The text was updated successfully, but these errors were encountered: