From 6e8e6aa77e8f617de9bdcd22257f3bfc80e2628f Mon Sep 17 00:00:00 2001 From: Christoph Olszowka Date: Thu, 28 May 2020 21:12:42 +0200 Subject: [PATCH] Upgrade rubocop and opt-in to all new cops --- .rubocop.yml | 24 ++++++++++++++++++++++++ .simplecov | 2 ++ Gemfile.lock | 17 +++++++++-------- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index b443184e..d69e0a58 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -55,3 +55,27 @@ Style/TrailingCommaInHashLiteral: # I actually use this a lot with `private :foo=` Style/AccessModifierDeclarations: Enabled: false + +# +# Opt-ins for new cops from v0.81+ onwards +# +Layout/EmptyLinesAroundAttributeAccessor: + Enabled: true +Layout/SpaceAroundMethodCallOperator: + Enabled: true +Lint/DeprecatedOpenSSLConstant: + Enabled: true +Lint/RaiseException: + Enabled: true +Lint/StructNewOverride: + Enabled: true +Style/ExponentialNotation: + Enabled: true +Style/HashEachMethods: + Enabled: true +Style/HashTransformKeys: + Enabled: true +Style/HashTransformValues: + Enabled: true +Style/SlicingWithRange: + Enabled: true diff --git a/.simplecov b/.simplecov index 3cee2731..3eca8f84 100644 --- a/.simplecov +++ b/.simplecov @@ -1,3 +1,5 @@ +# frozen_string_literal: true + SimpleCov.start do minimum_coverage 100 end diff --git a/Gemfile.lock b/Gemfile.lock index 0959dbff..2f7793d8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -32,7 +32,6 @@ GEM guard (~> 2.0) rubocop (~> 0.20) iniparse (1.5.0) - jaro_winkler (1.5.4) json-schema (2.8.1) addressable (>= 2.4) listen (3.1.5) @@ -49,7 +48,7 @@ GEM childprocess (>= 0.6.3, < 4) iniparse (~> 1.4) parallel (1.19.1) - parser (2.7.0.3) + parser (2.7.1.3) ast (~> 2.4.0) pry (0.13.1) coderay (~> 1.1) @@ -74,17 +73,19 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-support (3.9.2) - rubocop (0.80.1) - jaro_winkler (~> 1.5.1) + rubocop (0.84.0) parallel (~> 1.10) parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) rexml + rubocop-ast (>= 0.0.3) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 1.7) - rubocop-performance (1.5.2) + unicode-display_width (>= 1.4.0, < 2.0) + rubocop-ast (0.0.3) + parser (>= 2.7.0.1) + rubocop-performance (1.6.0) rubocop (>= 0.71.0) - rubocop-rspec (1.38.1) + rubocop-rspec (1.39.0) rubocop (>= 0.68.1) ruby-progressbar (1.10.1) ruby_dep (1.5.0) @@ -94,7 +95,7 @@ GEM simplecov-html (~> 0.11) simplecov-html (0.12.2) thor (0.20.3) - unicode-display_width (1.6.1) + unicode-display_width (1.7.0) PLATFORMS ruby