Skip to content
代码片段 群组 项目
提交 e7586cfb 编辑于 作者: Robert Speicher's avatar Robert Speicher
浏览文件

Merge branch 'rubocop/enable-negatedif-style-cop' into 'master'

Enable Style/NegatedIf Rubocop cop

Favor `unless` over `if` for negative conditions (or control flow ||).

```ruby
# bad
do_something if !some_condition
# bad
do_something if not some_condition

# good
do_something unless some_condition
# good
some_condition || do_something
```

See #17478

See merge request !4355
No related branches found
No related tags found
加载中
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册