Enable Style/InvertibleUnlessCondition cop
This commit is contained in:
parent
3b92bb9da5
commit
cccbb5c705
@ -373,6 +373,17 @@ Style/HashAsLastArrayItem:
|
|||||||
- "/**/Formula/**/*.rb"
|
- "/**/Formula/**/*.rb"
|
||||||
- "**/Formula/**/*.rb"
|
- "**/Formula/**/*.rb"
|
||||||
|
|
||||||
|
Style/InvertibleUnlessCondition:
|
||||||
|
inherit_mode:
|
||||||
|
override:
|
||||||
|
- InverseMethods
|
||||||
|
Enabled: true
|
||||||
|
InverseMethods:
|
||||||
|
# Favor `if a != b` over `unless a == b`
|
||||||
|
:==: :!=
|
||||||
|
# Unset this (prefer `unless a.zero?` over `if a.nonzero?`)
|
||||||
|
:zero?:
|
||||||
|
|
||||||
# would rather freeze too much than too little
|
# would rather freeze too much than too little
|
||||||
Style/MutableConstant:
|
Style/MutableConstant:
|
||||||
EnforcedStyle: strict
|
EnforcedStyle: strict
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user