You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if vet detected a few obviously stupid boolean conditions. This can
probably be done purely at a syntactic level, without recourse to any type checking.
x == y || x == y
is a redundant test, assuming neither x nor y contains function calls or channel
operations.
x != y || x != z
is not guaranteed to be wrong but almost always is. If y and z are the same then it's
redundant; if y and z are different then it's always true.
The text was updated successfully, but these errors were encountered:
I've come to the conclusion that flagging cases like x == false is a better fit for go
lint, and filed golang/lint#45 accordingly. CL for rsc's
original check coming soon.
The text was updated successfully, but these errors were encountered: