From 9ea8b775c0ba24e65f2ff45fa47bfb4aee9e553d Mon Sep 17 00:00:00 2001 From: Ivan Giuliani Date: Wed, 10 Jun 2020 09:52:20 +0100 Subject: [PATCH] Enable support for cops introduced by 0.85 Namely: - `Lint/MixedRegexpCaptureTypes` - `Style/RedundantRegexpCharacterClass` (disabled by default due to https://github.com/rubocop-hq/rubocop/issues/8098) - `Style/RedundantRegexpEscape` --- CHANGELOG.md | 5 +++++ gc_ruboconfig.gemspec | 4 ++-- rubocop.yml | 11 +++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6acb2c1..3059de4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog ========= +2.15.0 +------ +* Support new cops introduced by rubocop v0.85: `Lint/MixedRegexpCaptureTypes`, `Style/RedundantRegexpEscape` + and `Style/RedundantRegexpCharacterClass` (disabled by default) + 2.14.0 ------ * Enable a new cop introduced by rubocop v0.84: `Lint/DeprecatedOpenSSLConstant` diff --git a/gc_ruboconfig.gemspec b/gc_ruboconfig.gemspec index 3f1e7ca..4b253e5 100644 --- a/gc_ruboconfig.gemspec +++ b/gc_ruboconfig.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = 'gc_ruboconfig' - spec.version = '2.14.0' + spec.version = '2.15.0' spec.summary = "GoCardless's shared Rubocop configuration, conforming to our house style" spec.authors = %w[GoCardless] spec.homepage = 'https://github.com/gocardless/ruboconfig' @@ -10,7 +10,7 @@ Gem::Specification.new do |spec| spec.license = 'MIT' spec.files = 'rubocop.yml' - spec.add_dependency 'rubocop', '>= 0.84' + spec.add_dependency 'rubocop', '>= 0.85' spec.add_dependency 'rubocop-rspec', '>= 1.38.1' spec.add_dependency 'rubocop-performance', '~> 1.5' end diff --git a/rubocop.yml b/rubocop.yml index f8c3842..4153d9c 100644 --- a/rubocop.yml +++ b/rubocop.yml @@ -24,6 +24,9 @@ Lint/RaiseException: Lint/StructNewOverride: Enabled: true +Lint/MixedRegexpCaptureTypes: + Enabled: true + Metrics/ClassLength: Enabled: false @@ -171,5 +174,13 @@ Style/ExponentialNotation: Style/SlicingWithRange: Enabled: true +# Re-enable this when the following is resolved: +# https://github.com/rubocop-hq/rubocop/issues/8098 +Style/RedundantRegexpCharacterClass: + Enabled: false + +Style/RedundantRegexpEscape: + Enabled: true + Lint/DeprecatedOpenSSLConstant: Enabled: true