Skip to content

Commit

Permalink
InverseMethods only
Browse files Browse the repository at this point in the history
  • Loading branch information
dduugg committed Jan 19, 2024
1 parent ec979fe commit fca67eb
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Library/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,28 +354,21 @@ Style/HashAsLastArrayItem:

Style/InverseMethods:
Exclude:
# `exclude?` is not available everywhere
- "Homebrew/rubocops/**/*.rb"
- "Homebrew/sorbet/tapioca/require.rb"
# Some files are used in contexts without core extensions:
- "Homebrew/standalone/init.rb"
- "Homebrew/rubocops/**/*"
InverseMethods:
:include?: :exclude?
:exclude?: :include?

Style/InvertibleUnlessCondition:
Enabled: true
Exclude:
# `exclude?` is not available everywhere
- "Homebrew/rubocops/**/*.rb"
- "Homebrew/sorbet/tapioca/require.rb"
- "Homebrew/standalone/init.rb"
InverseMethods:
# Favor `if a != b` over `unless a == b`
:==: :!=
# Unset this (prefer `unless a.zero?` over `if a.nonzero?`)
:zero?:
:include?: :exclude?
:exclude?: :include?
# Don't require non-standard `exclude?` (for now at least) - it's not available in every file
:include?:

Style/MutableConstant:
# would rather freeze too much than too little
Expand Down

0 comments on commit fca67eb

Please sign in to comment.