diff --git a/Library/.rubocop.yml b/Library/.rubocop.yml index 7cb07e6f70..373b06036e 100644 --- a/Library/.rubocop.yml +++ b/Library/.rubocop.yml @@ -373,6 +373,17 @@ Style/HashAsLastArrayItem: - "/**/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 Style/MutableConstant: EnforcedStyle: strict