From d874e3370089b914ee91653124742d51ea50395e Mon Sep 17 00:00:00 2001 From: hoshinotsuyoshi Date: Wed, 18 Oct 2023 12:00:56 +0900 Subject: [PATCH] Use lastest steep and remove `Grepx` definition --- Gemfile | 2 +- Gemfile.lock | 68 ++++++++++++++++++++++-------------- lib/rubocop/cop/grep/grep.rb | 4 +-- sig/rubocop/cop/cop/grep.rbs | 4 +-- 4 files changed, 44 insertions(+), 34 deletions(-) diff --git a/Gemfile b/Gemfile index eb87905..03be5a5 100644 --- a/Gemfile +++ b/Gemfile @@ -11,5 +11,5 @@ gem "rspec", "~> 3.0" gem "rubocop", "~> 1.21" -gem 'steep', '1.4.0.dev.2', require: false +gem 'steep', require: false gem 'rbs', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 5b980c2..f0ac79c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,18 +7,28 @@ PATH GEM remote: https://rubygems.org/ specs: - activesupport (7.0.4.3) + activesupport (7.1.1) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) ast (2.4.2) + base64 (0.1.1) + bigdecimal (3.1.4) concurrent-ruby (1.2.2) - csv (3.2.6) + connection_pool (2.4.1) + csv (3.2.7) diff-lcs (1.5.0) - ffi (1.15.5) - fileutils (1.7.0) - i18n (1.12.0) + drb (2.1.1) + ruby2_keywords + ffi (1.16.3) + fileutils (1.7.1) + i18n (1.14.1) concurrent-ruby (~> 1.0) json (2.6.3) language_server-protocol (3.17.0.3) @@ -26,68 +36,72 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) logger (1.5.3) - minitest (5.18.0) - parallel (1.22.1) - parser (3.2.1.1) + minitest (5.20.0) + mutex_m (0.1.2) + parallel (1.23.0) + parser (3.2.2.4) ast (~> 2.4.1) - pathname (0.2.1) + racc + racc (1.7.1) rainbow (3.1.1) rake (13.0.6) rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - rbs (3.0.4) - regexp_parser (2.7.0) - rexml (3.2.5) + rbs (3.2.2) + regexp_parser (2.8.2) + rexml (3.2.6) rspec (3.12.0) rspec-core (~> 3.12.0) rspec-expectations (~> 3.12.0) rspec-mocks (~> 3.12.0) - rspec-core (3.12.1) + rspec-core (3.12.2) rspec-support (~> 3.12.0) - rspec-expectations (3.12.2) + rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.4) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-support (3.12.0) - rubocop (1.48.1) + rspec-support (3.12.1) + rubocop (1.57.1) + base64 (~> 0.1.1) json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.0.0) + parser (>= 3.2.2.4) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.26.0, < 2.0) + rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.27.0) + rubocop-ast (1.29.0) parser (>= 3.2.1.0) ruby-progressbar (1.13.0) + ruby2_keywords (0.0.5) securerandom (0.2.2) - steep (1.4.0.dev.2) + steep (1.5.3) activesupport (>= 5.1) + concurrent-ruby (>= 1.1.10) csv (>= 3.0.9) fileutils (>= 1.1.0) json (>= 2.1.0) language_server-protocol (>= 3.15, < 4.0) listen (~> 3.0) logger (>= 1.3.0) - parallel (>= 1.0.0) parser (>= 3.1) - pathname (>= 0.2.1) rainbow (>= 2.2.2, < 4.0) - rbs (>= 2.8.0) + rbs (>= 3.1.0) securerandom (>= 0.1) strscan (>= 1.0.0) terminal-table (>= 2, < 4) - strscan (3.0.6) + strscan (3.0.7) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.4.2) + unicode-display_width (2.5.0) PLATFORMS arm64-darwin-21 @@ -100,7 +114,7 @@ DEPENDENCIES rspec (~> 3.0) rubocop (~> 1.21) rubocop-grep! - steep (= 1.4.0.dev.2) + steep BUNDLED WITH 2.4.7 diff --git a/lib/rubocop/cop/grep/grep.rb b/lib/rubocop/cop/grep/grep.rb index 16577cd..6521075 100644 --- a/lib/rubocop/cop/grep/grep.rb +++ b/lib/rubocop/cop/grep/grep.rb @@ -4,7 +4,7 @@ module RuboCop module Cop module Grep # Detect code snippets which are matched with specified Regexps. - class Grepx < Base + class Grep < Base include RangeHelp def on_new_investigation @@ -55,8 +55,6 @@ def on_new_investigation opt end end - - Grep = _ = Grepx end end end diff --git a/sig/rubocop/cop/cop/grep.rbs b/sig/rubocop/cop/cop/grep.rbs index 91bc6d1..35c72e0 100644 --- a/sig/rubocop/cop/cop/grep.rbs +++ b/sig/rubocop/cop/cop/grep.rbs @@ -1,7 +1,7 @@ module RuboCop module Cop module Grep - class Grepx < ::RuboCop::Cop::Base + class Grep < ::RuboCop::Cop::Base include RangeHelp type rule = { @@ -33,8 +33,6 @@ module RuboCop def cop_config: () -> config end - # HACK: Steep has a bug when the class name is the same as the parent namespace name. - class Grep = Grepx end end end