Skip to content

Commit

Permalink
Simplify rubocop config with NewCops: enable (#151)
Browse files Browse the repository at this point in the history
Now whenever we upgrade rubocop, new cops will be enabled by default
without having to make tedious changes to the config.
  • Loading branch information
mattbrictson authored Jul 7, 2020
1 parent 50c47de commit 516ed2c
Showing 1 changed file with 1 addition and 48 deletions.
49 changes: 1 addition & 48 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ require:
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
NewCops: enable
TargetRubyVersion: 2.5
Exclude:
- "lib/tomo/templates/config.rb"
- "readme_images/**/*"
- "tmp/**/*"
- "vendor/**/*"

Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true

Layout/HashAlignment:
EnforcedColonStyle:
- table
Expand All @@ -23,27 +21,9 @@ Layout/HashAlignment:
- table
- key

Layout/LineLength:
Max: 120

Layout/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space

Layout/SpaceAroundMethodCallOperator:
Enabled: true

Lint/DeprecatedOpenSSLConstant:
Enabled: true

Lint/MixedRegexpCaptureTypes:
Enabled: true

Lint/RaiseException:
Enabled: true

Lint/StructNewOverride:
Enabled: true

Metrics/AbcSize:
Max: 20
Exclude:
Expand Down Expand Up @@ -87,42 +67,15 @@ Style/DoubleNegation:
Style/EmptyMethod:
Enabled: false

Style/ExponentialNotation:
Enabled: true

Style/FormatStringToken:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false

Style/HashEachMethods:
Enabled: true

Style/HashSyntax:
EnforcedStyle: ruby19

Style/HashTransformKeys:
Enabled: true

Style/HashTransformValues:
Enabled: true

Style/NumericPredicate:
Enabled: false

Style/RedundantFetchBlock:
Enabled: true

Style/RedundantRegexpCharacterClass:
Enabled: true

Style/RedundantRegexpEscape:
Enabled: true

Style/SlicingWithRange:
Enabled: true

Style/StringLiterals:
EnforcedStyle: double_quotes

Expand Down

0 comments on commit 516ed2c

Please sign in to comment.