Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rubocop: Trim exclude paths without offenses; move some more config #14878

Merged
merged 4 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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:
issyl0 marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -16,6 +16,9 @@ Layout/MultilineMethodCallIndentation:
- "**/*_spec.rb"

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