• Robert Speicher's avatar
    Merge branch 'rubocop/enable-negatedif-style-cop' into 'master' · e7586cfb
    Robert Speicher authored
    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
    e7586cfb
.rubocop.yml 27.3 KB