From 960e79676201746de6a525f45414f64120d27518 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Tue, 19 Dec 2023 08:52:39 +0100 Subject: [PATCH] Update RuboCop and fix failing spec A new offense in RuboCop causes an issue when running specs locally. This commit fixes the behavior by making RuboCop happy with `each_key` Close #464 --- Appraisals | 2 +- gemfiles/haml5.0.gemfile | 2 +- gemfiles/haml5.1.gemfile | 2 +- gemfiles/haml5.2.gemfile | 2 +- gemfiles/haml6.0.gemfile | 2 +- gemfiles/haml6.1.gemfile | 2 +- gemfiles/haml6.2.gemfile | 2 +- gemfiles/haml6.3.gemfile | 2 +- gemfiles/rubocop1.0.gemfile | 2 +- .../rubocop_autocorrect_examples/script_examples.txt | 8 ++++---- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Appraisals b/Appraisals index c7e37009..7c069c9d 100644 --- a/Appraisals +++ b/Appraisals @@ -32,5 +32,5 @@ appraise 'haml6.3' do end appraise 'rubocop1.0' do - gem 'rubocop', '~> 1.0.0' + gem 'rubocop', '~> 1.59.0' end diff --git a/gemfiles/haml5.0.gemfile b/gemfiles/haml5.0.gemfile index ab3a47f6..bc72917f 100644 --- a/gemfiles/haml5.0.gemfile +++ b/gemfiles/haml5.0.gemfile @@ -7,7 +7,7 @@ gem "rspec", "~> 3.8" gem "rspec-its", "~> 1.0" gem "appraisal" gem "overcommit", "0.60.0" -gem "rubocop", "1.57.2" +gem "rubocop", "1.59.0" gem "simplecov", "~> 0.22.0" gem "simplecov-lcov", "~> 0.8.0" gem "haml", "~> 5.0.0" diff --git a/gemfiles/haml5.1.gemfile b/gemfiles/haml5.1.gemfile index 86887848..0865c9ea 100644 --- a/gemfiles/haml5.1.gemfile +++ b/gemfiles/haml5.1.gemfile @@ -7,7 +7,7 @@ gem "rspec", "~> 3.8" gem "rspec-its", "~> 1.0" gem "appraisal" gem "overcommit", "0.60.0" -gem "rubocop", "1.57.2" +gem "rubocop", "1.59.0" gem "simplecov", "~> 0.22.0" gem "simplecov-lcov", "~> 0.8.0" gem "haml", "~> 5.1.0" diff --git a/gemfiles/haml5.2.gemfile b/gemfiles/haml5.2.gemfile index a383b4f5..b0e27b81 100644 --- a/gemfiles/haml5.2.gemfile +++ b/gemfiles/haml5.2.gemfile @@ -7,7 +7,7 @@ gem "rspec", "~> 3.8" gem "rspec-its", "~> 1.0" gem "appraisal" gem "overcommit", "0.60.0" -gem "rubocop", "1.57.2" +gem "rubocop", "1.59.0" gem "simplecov", "~> 0.22.0" gem "simplecov-lcov", "~> 0.8.0" gem "haml", "~> 5.2.0" diff --git a/gemfiles/haml6.0.gemfile b/gemfiles/haml6.0.gemfile index c7f30185..d722872d 100644 --- a/gemfiles/haml6.0.gemfile +++ b/gemfiles/haml6.0.gemfile @@ -7,7 +7,7 @@ gem "rspec", "~> 3.8" gem "rspec-its", "~> 1.0" gem "appraisal" gem "overcommit", "0.60.0" -gem "rubocop", "1.57.2" +gem "rubocop", "1.59.0" gem "simplecov", "~> 0.22.0" gem "simplecov-lcov", "~> 0.8.0" gem "haml", "~> 6.0.0" diff --git a/gemfiles/haml6.1.gemfile b/gemfiles/haml6.1.gemfile index d1ddaef5..2f89767b 100644 --- a/gemfiles/haml6.1.gemfile +++ b/gemfiles/haml6.1.gemfile @@ -7,7 +7,7 @@ gem "rspec", "~> 3.8" gem "rspec-its", "~> 1.0" gem "appraisal" gem "overcommit", "0.60.0" -gem "rubocop", "1.57.2" +gem "rubocop", "1.59.0" gem "simplecov", "~> 0.22.0" gem "simplecov-lcov", "~> 0.8.0" gem "haml", "~> 6.1.0" diff --git a/gemfiles/haml6.2.gemfile b/gemfiles/haml6.2.gemfile index 1a3bde41..a9a65fd6 100644 --- a/gemfiles/haml6.2.gemfile +++ b/gemfiles/haml6.2.gemfile @@ -7,7 +7,7 @@ gem "rspec", "~> 3.8" gem "rspec-its", "~> 1.0" gem "appraisal" gem "overcommit", "0.60.0" -gem "rubocop", "1.57.2" +gem "rubocop", "1.59.0" gem "simplecov", "~> 0.22.0" gem "simplecov-lcov", "~> 0.8.0" gem "haml", "~> 6.2.0" diff --git a/gemfiles/haml6.3.gemfile b/gemfiles/haml6.3.gemfile index 5c26d553..4e6a2cf9 100644 --- a/gemfiles/haml6.3.gemfile +++ b/gemfiles/haml6.3.gemfile @@ -7,7 +7,7 @@ gem "rspec", "~> 3.8" gem "rspec-its", "~> 1.0" gem "appraisal" gem "overcommit", "0.60.0" -gem "rubocop", "1.57.2" +gem "rubocop", "1.59.0" gem "simplecov", "~> 0.22.0" gem "simplecov-lcov", "~> 0.8.0" gem "haml", "~> 6.3.0" diff --git a/gemfiles/rubocop1.0.gemfile b/gemfiles/rubocop1.0.gemfile index 87a73d9e..069275d9 100644 --- a/gemfiles/rubocop1.0.gemfile +++ b/gemfiles/rubocop1.0.gemfile @@ -7,7 +7,7 @@ gem "rspec", "~> 3.8" gem "rspec-its", "~> 1.0" gem "appraisal" gem "overcommit", "0.60.0" -gem "rubocop", "~> 1.0.0" +gem "rubocop", "~> 1.59.0" gem "simplecov", "~> 0.22.0" gem "simplecov-lcov", "~> 0.8.0" diff --git a/spec/haml_lint/linter/rubocop_autocorrect_examples/script_examples.txt b/spec/haml_lint/linter/rubocop_autocorrect_examples/script_examples.txt index a1e902c4..222d93f2 100644 --- a/spec/haml_lint/linter/rubocop_autocorrect_examples/script_examples.txt +++ b/spec/haml_lint/linter/rubocop_autocorrect_examples/script_examples.txt @@ -462,22 +462,22 @@ haml_lint_marker_9 !!! Handles an anonymous block with a trailing comment -- list.each do |var, var2| # Some comment +- list.each_key do |var| # Some comment = foo(:bar => 123) --- haml_lint_marker_1 -list.each do |var, var2| # Some comment +list.each_key do |var| # Some comment HL.out = foo(:bar => 123) $$2 end haml_lint_marker_5 --- haml_lint_marker_1 -list.each do |_var, _var2| # Some comment +list.each_key do |_var| # Some comment HL.out = foo(bar: 123) end haml_lint_marker_5 --- -- list.each do |_var, _var2| # Some comment +- list.each_key do |_var| # Some comment = foo(bar: 123)