Skip to content

Commit

Permalink
rubocop: exclude formula.rb from ClassLength.
Browse files Browse the repository at this point in the history
We want to allow this class to grow larger still while still enforcing
this on other classes.
  • Loading branch information
MikeMcQuaid committed Aug 4, 2020
1 parent 361b92a commit 754beb6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
1 change: 0 additions & 1 deletion Library/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ Lint/AmbiguousRegexpLiteral:
Lint/ParenthesesAsGroupedExpression:
Enabled: false


# most metrics don't make sense to apply for formulae/taps
Metrics/AbcSize:
Enabled: false
Expand Down
4 changes: 3 additions & 1 deletion Library/.rubocop_cask.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Cask/StanzaOrder:
Description: 'Ensure that cask stanzas are sorted correctly. More info at https://github.com/Homebrew/homebrew-cask/blob/HEAD/CONTRIBUTING.md#stanza-order'
Enabled: true

# don't want this for casks but re-enabled for Library/Homebrew
# don't want these for casks but re-enabled for Library/Homebrew
Style/FrozenStringLiteralComment:
Enabled: false
Metrics/BlockLength:
Enabled: false
19 changes: 11 additions & 8 deletions Library/Homebrew/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,33 @@ Lint/ParenthesesAsGroupedExpression:
# TODO: try to bring down all metrics maximums
Metrics/AbcSize:
Enabled: true
Max: 275
Max: 250
Metrics/BlockLength:
Enabled: true
Max: 1100
Max: 100
Exclude:
- 'test/formula_spec.rb'
- 'test/**/*'
Metrics/BlockNesting:
Enabled: true
Max: 5
Metrics/ClassLength:
Enabled: true
Max: 1400
Max: 800
Exclude:
- 'formula.rb'
- 'formula_installer.rb'
Metrics/CyclomaticComplexity:
Enabled: true
Max: 85
Max: 80
Metrics/MethodLength:
Enabled: true
Max: 300
Max: 260
Metrics/ModuleLength:
Enabled: true
Max: 550
Max: 500
Metrics/PerceivedComplexity:
Enabled: true
Max: 100
Max: 80

# we won't change backward compatible predicate names
Naming/PredicateName:
Expand Down

0 comments on commit 754beb6

Please sign in to comment.