From 516ed2c5f58f4799c55478dacf4f45fd0aa46344 Mon Sep 17 00:00:00 2001 From: Matt Brictson Date: Tue, 7 Jul 2020 08:08:09 -0700 Subject: [PATCH] Simplify rubocop config with `NewCops: enable` (#151) Now whenever we upgrade rubocop, new cops will be enabled by default without having to make tedious changes to the config. --- .rubocop.yml | 49 +------------------------------------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index dd1f058a..3ef9916c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,6 +5,7 @@ require: AllCops: DisplayCopNames: true DisplayStyleGuide: true + NewCops: enable TargetRubyVersion: 2.5 Exclude: - "lib/tomo/templates/config.rb" @@ -12,9 +13,6 @@ AllCops: - "tmp/**/*" - "vendor/**/*" -Layout/EmptyLinesAroundAttributeAccessor: - Enabled: true - Layout/HashAlignment: EnforcedColonStyle: - table @@ -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: @@ -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