Skip to content

Commit

Permalink
rubocop.yml: enable new rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Apr 17, 2020
1 parent e06e372 commit bc96428
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
19 changes: 13 additions & 6 deletions Library/.rubocop.yml
Expand Up @@ -8,6 +8,19 @@ FormulaAudit:
FormulaAuditStrict:
Enabled: true

# enable all pending rubocops
AllCops:
NewCops: enable

# don't allow cops to be disabled in formulae
Style/DisableCopsWithinSourceCodeDirective:
Enabled: true
Exclude:
# TODO: really long lines but hard to resolve (but would be nice to do).
- '**/Formula/libgraphqlparser.rb'
# TODO: false positive in RuboCop, see if it can be worked around/fixed.
- '**/Formula/rpm.rb'

# make our hashes consistent
Layout/HashAlignment:
EnforcedHashRocketStyle: table
Expand Down Expand Up @@ -46,12 +59,6 @@ Lint/AmbiguousRegexpLiteral:
Lint/ParenthesesAsGroupedExpression:
Enabled: false

# not enabled by default but nice to have
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true

# most metrics don't make sense to apply for formulae/taps
Metrics/AbcSize:
Enabled: false
Expand Down
4 changes: 4 additions & 0 deletions Library/.rubocop_rspec.yml
Expand Up @@ -8,6 +8,10 @@ AllCops:
Exclude:
- '**/vendor/**/*'

# allow style to be disabled in non-formulae code
Style/DisableCopsWithinSourceCodeDirective:
Enabled: false

# Intentionally disabled as it doesn't fit with our code style.
RSpec/AnyInstance:
Enabled: false
Expand Down

0 comments on commit bc96428

Please sign in to comment.