Add a cop that forbids having negation in unless
Let's add a cop that forbids having more than one conditions negation in unless
, because it's hard to understand it. Sometimes I even need to apply De Morgan's laws and rewrite it in if
to understand it.
This was brought up in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13788#note_39213506 where we should write if
rather than unless
.
Edited by Lin Jen-Shin