From 2292ea7a15f2fdb83df9fc4c13f0862f26119af5 Mon Sep 17 00:00:00 2001 From: Ben Thorner Date: Thu, 16 Apr 2020 09:55:27 +0100 Subject: [PATCH] Disable pending cops by default Previously we had to explicitly configure pending cops to avoid CLI warnings. In general we (try to) accept the RuboCop defaults, but 'pending' cops do not have a clear default behaviour. This ignores all pending cops until they are enabled by default. Note: this feature requires rubocop v0.82 --- CHANGELOG.md | 4 ++++ config/default.yml | 1 + config/gds-ruby-styleguide.yml | 2 +- config/other-lint.yml | 4 ---- config/other-style.yml | 9 --------- rubocop-govuk.gemspec | 4 ++-- 6 files changed, 8 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52ca342e..8c17c154 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 3.5.0 + +* Disable pending cops by default (#37) + # 3.4.0 * Add rubocop-rake cops (#32) diff --git a/config/default.yml b/config/default.yml index 83a62913..606d3d48 100644 --- a/config/default.yml +++ b/config/default.yml @@ -1,4 +1,5 @@ AllCops: + NewCops: disable Exclude: - 'bin/**' - 'config.ru' diff --git a/config/gds-ruby-styleguide.yml b/config/gds-ruby-styleguide.yml index c11be31f..c6677a3c 100644 --- a/config/gds-ruby-styleguide.yml +++ b/config/gds-ruby-styleguide.yml @@ -104,7 +104,7 @@ Layout/SpaceInsideParens: Description: No spaces after ( or before ). Enabled: true -Layout/Tab: +Layout/IndentationStyle: Description: No hard tabs. Enabled: true diff --git a/config/other-lint.yml b/config/other-lint.yml index 53d965f5..da37ffb3 100644 --- a/config/other-lint.yml +++ b/config/other-lint.yml @@ -34,10 +34,6 @@ Lint/EmptyInterpolation: Description: 'Checks for empty string interpolation.' Enabled: true -Lint/EndBlock: - Description: 'END blocks should not be placed inside method definitions.' - Enabled: true - Lint/EnsureReturn: Description: 'Never use return in an ensure block.' Enabled: true diff --git a/config/other-style.yml b/config/other-style.yml index c52b9c14..7f8a2a45 100644 --- a/config/other-style.yml +++ b/config/other-style.yml @@ -380,12 +380,3 @@ Style/WhileUntilModifier: Style/FrozenStringLiteralComment: Enabled: false - -Style/HashEachMethods: - Enabled: true - -Style/HashTransformKeys: - Enabled: true - -Style/HashTransformValues: - Enabled: true diff --git a/rubocop-govuk.gemspec b/rubocop-govuk.gemspec index 81ec3f32..0ad79236 100644 --- a/rubocop-govuk.gemspec +++ b/rubocop-govuk.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "rubocop-govuk" - spec.version = "3.4.0" + spec.version = "3.5.0" spec.authors = ["Government Digital Service"] spec.email = ["govuk-dev@digital.cabinet-office.gov.uk"] @@ -15,7 +15,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency "rake", "~> 13.0" - spec.add_dependency "rubocop", "0.81.0" + spec.add_dependency "rubocop", "0.82.0" spec.add_dependency "rubocop-rails", "~> 2" spec.add_dependency "rubocop-rake", "~> 0.5.1" spec.add_dependency "rubocop-rspec", "~> 1.28"