From 813e6d4781e21115dcd687b2a73aa8451f49ef98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Fri, 20 Mar 2020 15:10:33 +0100 Subject: update rubocop to 0.80.1 and rubocop-rails to 2.4.1 --- .rubocop.yml | 17 +++++++++++++---- Gemfile | 4 ++-- Gemfile.lock | 12 +++++++----- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 28f9edea4..5b6980af4 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -12,7 +12,7 @@ Rails/HttpPositionalArguments: Enabled: false # Commonly used screens these days easily fit more than 80 characters. -Metrics/LineLength: +Layout/LineLength: Max: 120 # Too short methods lead to extraction of single-use methods, which can make @@ -62,7 +62,7 @@ Style/SymbolArray: Enabled: true # Most readable form. -Layout/AlignHash: +Layout/HashAlignment: EnforcedHashRocketStyle: table EnforcedColonStyle: table @@ -84,7 +84,6 @@ Style/CollectionMethods: # inject seems more common in the community. reduce: "inject" - # Either allow this style or don't. Marking it as safe with parenthesis # is silly. Let's try to live without them for now. Style/ParenthesesAroundCondition: @@ -111,7 +110,7 @@ Style/SignalException: # Suppressing exceptions can be perfectly fine, and be it to avoid to # explicitly type nil into the rescue since that's what you want to return, # or suppressing LoadError for optional dependencies -Lint/HandleExceptions: +Lint/SuppressedException: Enabled: false Layout/SpaceInsideBlockBraces: @@ -174,3 +173,13 @@ Style/NumericPredicate: # Reset some HoundCI changes back to Rubocop defaults Layout/DotPosition: EnforcedStyle: leading + +# Not enabled by default but good +Style/HashEachMethods: + Enabled: true + +# TODO: Enable with Ruby 2.5 +Style/HashTransformKeys: + Enabled: false +Style/HashTransformValues: + Enabled: false diff --git a/Gemfile b/Gemfile index c4cf7ab04..df7fb2d30 100644 --- a/Gemfile +++ b/Gemfile @@ -254,8 +254,8 @@ group :development do gem "pronto-haml", "0.10.0", require: false gem "pronto-rubocop", "0.10.0", require: false gem "pronto-scss", "0.10.0", require: false - gem "rubocop", "0.72.0", require: false - gem "rubocop-rails", "2.1.0", require: false + gem "rubocop", "0.80.1", require: false + gem "rubocop-rails", "2.4.1", require: false # Preloading environment diff --git a/Gemfile.lock b/Gemfile.lock index 7aa2e84b5..6ad403ea9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -618,6 +618,7 @@ GEM responders (2.4.1) actionpack (>= 4.2.0, < 6.0) railties (>= 4.2.0, < 6.0) + rexml (3.2.4) rotp (2.1.2) rqrcode (0.10.1) chunky_png (~> 1.0) @@ -643,14 +644,15 @@ GEM rspec-mocks (~> 3.9.0) rspec-support (~> 3.9.0) rspec-support (3.9.2) - rubocop (0.72.0) + rubocop (0.80.1) jaro_winkler (~> 1.5.1) parallel (~> 1.10) - parser (>= 2.6) + parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) + rexml ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) - rubocop-rails (2.1.0) + rubocop-rails (2.4.1) rack (>= 1.1) rubocop (>= 0.72.0) ruby-oembed (0.12.0) @@ -906,8 +908,8 @@ DEPENDENCIES rqrcode (= 0.10.1) rspec-json_expectations (~> 2.1) rspec-rails (= 3.9.1) - rubocop (= 0.72.0) - rubocop-rails (= 2.1.0) + rubocop (= 0.80.1) + rubocop-rails (= 2.4.1) ruby-oembed (= 0.12.0) rubyzip (= 1.3.0) sass-rails (= 5.0.7) -- cgit v1.2.3