From de94e635595319d13104d5941eb369d32c3816d2 Mon Sep 17 00:00:00 2001 From: camilopayan Date: Mon, 13 Mar 2023 20:36:57 +0000 Subject: [PATCH 1/3] [ 2023-03-13 ] - Update dependencies --- CHANGELOG.md | 5 +++++ Gemfile.lock | 18 +++++++++--------- standard.gemspec | 4 ++-- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85998f80..e5ac289f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## Unreleased + +* Update rubocop-performance from 1.15.2 to [1.16.0](https://github.com/rubocop/rubocop-performance/releases/tag/v1.16.0) +* Update rubocop from 1.44.1 to [1.48.1](https://github.com/rubocop/rubocop/releases/tag/v1.48.1) + ## 1.24.3 * _Further_ _further_ _further_ improve `--lsp` server to ignore files correctly diff --git a/Gemfile.lock b/Gemfile.lock index 9aa21ac7..c5930228 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,8 +3,8 @@ PATH specs: standard (1.24.3) language_server-protocol (~> 3.17.0.2) - rubocop (= 1.44.1) - rubocop-performance (= 1.15.2) + rubocop (= 1.48.1) + rubocop-performance (= 1.16.0) GEM remote: https://rubygems.org/ @@ -19,9 +19,9 @@ GEM method_source (>= 0.6.7) rake (>= 0.9.2.2) method_source (1.0.0) - minitest (5.17.0) + minitest (5.18.0) parallel (1.22.1) - parser (3.2.1.0) + parser (3.2.1.1) ast (~> 2.4.1) pry (0.14.2) coderay (~> 1.1) @@ -30,22 +30,22 @@ GEM rake (13.0.6) regexp_parser (2.7.0) rexml (3.2.5) - rubocop (1.44.1) + rubocop (1.48.1) json (~> 2.3) parallel (~> 1.10) parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.24.1, < 2.0) + rubocop-ast (>= 1.26.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.26.0) + rubocop-ast (1.27.0) parser (>= 3.2.1.0) - rubocop-performance (1.15.2) + rubocop-performance (1.16.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - ruby-progressbar (1.11.0) + ruby-progressbar (1.13.0) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) diff --git a/standard.gemspec b/standard.gemspec index f571a96d..6a4c7c3c 100644 --- a/standard.gemspec +++ b/standard.gemspec @@ -19,8 +19,8 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_dependency "rubocop", "1.44.1" - spec.add_dependency "rubocop-performance", "1.15.2" + spec.add_dependency "rubocop", "1.48.1" + spec.add_dependency "rubocop-performance", "1.16.0" # not semver: first three are lsp protocol version, last is patch spec.add_dependency "language_server-protocol", "~> 3.17.0.2" From aed3e99e80e533ab6c705b7934abfc8b5f952c03 Mon Sep 17 00:00:00 2001 From: Camilo Payan Date: Tue, 14 Mar 2023 13:47:00 -0400 Subject: [PATCH 2/3] Updates rubocop rules ON STREAM --- config/base.yml | 12 ++++++++++++ config/ruby-2.3.yml | 3 +++ 2 files changed, 15 insertions(+) diff --git a/config/base.yml b/config/base.yml index e1a13aa7..0973a14b 100644 --- a/config/base.yml +++ b/config/base.yml @@ -855,6 +855,9 @@ Metrics/BlockNesting: Metrics/ClassLength: Enabled: false +Metrics/CollectionLiteralLength: + Enabled: false + Metrics/CyclomaticComplexity: Enabled: false @@ -1246,6 +1249,9 @@ Style/DefWithParentheses: Style/Dir: Enabled: true +Style/DirEmpty: + Enabled: true + Style/DisableCopsWithinSourceCodeDirective: Enabled: false @@ -1325,6 +1331,9 @@ Style/ExponentialNotation: Style/FetchEnvVar: Enabled: false +Style/FileEmpty: + Enabled: false + Style/FileRead: Enabled: true @@ -1692,6 +1701,9 @@ Style/RedundantFileExtensionInRequire: Style/RedundantFreeze: Enabled: true +Style/RedundantHeredocDelimiterQuotes: + Enabled: true + Style/RedundantInitialize: Enabled: true diff --git a/config/ruby-2.3.yml b/config/ruby-2.3.yml index 3dfb4cd5..17978a85 100644 --- a/config/ruby-2.3.yml +++ b/config/ruby-2.3.yml @@ -5,3 +5,6 @@ AllCops: Style/ComparableClamp: Enabled: false + +Style/DirEmpty: + Enabled: false From 02415e79aedd50a9fe0bd863b1c8a6dac1e99ba5 Mon Sep 17 00:00:00 2001 From: Camilo Payan Date: Thu, 16 Mar 2023 06:43:13 -0400 Subject: [PATCH 3/3] Fixes missing configuration in cop_invoker for tests. --- test/cop_invoker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cop_invoker.rb b/test/cop_invoker.rb index 92c4ebc6..84009a0d 100644 --- a/test/cop_invoker.rb +++ b/test/cop_invoker.rb @@ -192,7 +192,7 @@ def with_offense_annotations(offenses) end def _investigate(cop, processed_source) - team = RuboCop::Cop::Team.new([cop], nil, raise_error: true) + team = RuboCop::Cop::Team.new([cop], configuration, raise_error: true) report = team.investigate(processed_source) @processed_source = processed_source @last_corrector = report.correctors.first || RuboCop::Cop::Corrector.new(processed_source)