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
Maybe more in general, within computed properties named hashValue, prohibit all known checked operations (+, *, etc.) and recommend their unchecked variants (&+, &*, etc.)?
It should be a optional rule.
I cannot think of any reasonable hashing situation where the checked variations would actually be better. Such a rule may as well be on by default.
New Issue Checklist
Rule Request
I don't know 100% if this should be a rule, but it is possible in swift to overflow hash value by doing
"test-1".hashValue + "test-2".hashValue
And for avoiding it it should be done like this
"test-1".hashValue &+ "test-2".hashValue
It should be a optional rule.
It could prevent some crashes that people don't think about :)
The text was updated successfully, but these errors were encountered: