Skip to content

Commit

Permalink
Merge pull request #14878 from issyl0/a-little-more-rubocop-tidying
Browse files Browse the repository at this point in the history
rubocop: Trim exclude paths without offenses; move some more config
  • Loading branch information
MikeMcQuaid authored Mar 6, 2023
2 parents 9c2a333 + 72a694d commit b05bd61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
20 changes: 4 additions & 16 deletions Library/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ inherit_mode:
merge:
- Include
- Exclude
- AllowedMethods

AllCops:
TargetRubyVersion: 2.6
Expand Down Expand Up @@ -342,12 +341,6 @@ Style/BlockDelimiters:
- "sig"
Exclude:
- "Homebrew/**/*_spec.rb"
- "Homebrew/**/shared_examples/**/*.rb"

# TODO: remove this when possible.
Style/ClassVars:
Exclude:
- "**/developer/bin/*"

# Use consistent style for better readability.
Style/CollectionMethods:
Expand Down Expand Up @@ -388,11 +381,6 @@ Style/FrozenStringLiteralComment:
- "**/*.rbi"
- "**/Brewfile"

# TODO: remove this when possible.
Style/GlobalVars:
Exclude:
- "**/developer/bin/*"

# potential for errors in formulae too high with this
Style/GuardClause:
Exclude:
Expand All @@ -407,6 +395,10 @@ Style/HashAsLastArrayItem:
- "/**/Formula/**/*.rb"
- "**/Formula/**/*.rb"

# would rather freeze too much than too little
Style/MutableConstant:
EnforcedStyle: strict

# Zero-prefixed octal literals are widely used and understood.
Style/NumericLiteralPrefix:
EnforcedOctalStyle: zero_only
Expand Down Expand Up @@ -483,7 +475,3 @@ Style/UnlessLogicalOperators:
# a bit confusing to non-Rubyists but useful for longer arrays
Style/WordArray:
MinSize: 4

# would rather freeze too much than too little
Style/MutableConstant:
EnforcedStyle: strict
3 changes: 3 additions & 0 deletions Library/Homebrew/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Homebrew/MoveToExtendOS:
- "os.rb"

Naming/PredicateName:
inherit_mode:
merge:
- AllowedMethods
AllowedMethods:
- is_32_bit?
- is_64_bit?
Expand Down

0 comments on commit b05bd61

Please sign in to comment.