Skip to content

Commit 939bfe9

Browse files
authored
Upgrade RuboCop related gems (#3367)
Upgrade RuboCop to latest
1 parent 0b96a11 commit 939bfe9

File tree

11 files changed

+3894
-2096
lines changed

11 files changed

+3894
-2096
lines changed

.rubocop.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
inherit_gem:
22
rubocop-shopify: rubocop.yml
33

4+
plugins:
5+
- rubocop-rake
6+
- rubocop-minitest
7+
48
require:
59
- rubocop-sorbet
6-
- rubocop-minitest
7-
- rubocop-rake
810
- ./lib/rubocop/cop/ruby_lsp/use_language_server_aliases
911
- ./lib/rubocop/cop/ruby_lsp/use_register_with_handler_method
1012

Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ group :development do
1313
gem "mocha", "~> 2.3"
1414
gem "psych", "~> 5.1", require: false
1515
gem "rake", "~> 13.2"
16-
gem "rubocop-minitest", "~> 0.36.0", require: false
17-
gem "rubocop-rake", "~> 0.6.0", require: false
18-
gem "rubocop-shopify", "~> 2.15", require: false
16+
gem "rubocop-minitest", "~> 0.38", require: false
17+
gem "rubocop-rake", "~> 0.7", require: false
18+
gem "rubocop-shopify", "~> 2.16", require: false
1919
gem "rubocop-sorbet", "~> 0.8", require: false
2020
gem "rubocop", "~> 1.70"
2121
gem "syntax_tree", ">= 6.1.1", "< 7"

Gemfile.lock

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,27 @@ GEM
6060
io-console (~> 0.5)
6161
require-hooks (0.2.2)
6262
rexml (3.4.1)
63-
rubocop (1.72.0)
63+
rubocop (1.76.2)
6464
json (~> 2.3)
6565
language_server-protocol (~> 3.17.0.2)
6666
lint_roller (~> 1.1.0)
6767
parallel (~> 1.10)
6868
parser (>= 3.3.0.2)
6969
rainbow (>= 2.2.2, < 4.0)
7070
regexp_parser (>= 2.9.3, < 3.0)
71-
rubocop-ast (>= 1.38.0, < 2.0)
71+
rubocop-ast (>= 1.45.1, < 2.0)
7272
ruby-progressbar (~> 1.7)
7373
unicode-display_width (>= 2.4.0, < 4.0)
7474
rubocop-ast (1.45.1)
7575
parser (>= 3.3.7.2)
7676
prism (~> 1.4)
77-
rubocop-minitest (0.36.0)
78-
rubocop (>= 1.61, < 2.0)
79-
rubocop-ast (>= 1.31.1, < 2.0)
80-
rubocop-rake (0.6.0)
81-
rubocop (~> 1.0)
77+
rubocop-minitest (0.38.1)
78+
lint_roller (~> 1.1)
79+
rubocop (>= 1.75.0, < 2.0)
80+
rubocop-ast (>= 1.38.0, < 2.0)
81+
rubocop-rake (0.7.1)
82+
lint_roller (~> 1.1)
83+
rubocop (>= 1.72.1)
8284
rubocop-shopify (2.17.1)
8385
rubocop (~> 1.62)
8486
rubocop-sorbet (0.8.7)
@@ -141,9 +143,9 @@ DEPENDENCIES
141143
psych (~> 5.1)
142144
rake (~> 13.2)
143145
rubocop (~> 1.70)
144-
rubocop-minitest (~> 0.36.0)
145-
rubocop-rake (~> 0.6.0)
146-
rubocop-shopify (~> 2.15)
146+
rubocop-minitest (~> 0.38)
147+
rubocop-rake (~> 0.7)
148+
rubocop-shopify (~> 2.16)
147149
rubocop-sorbet (~> 0.8)
148150
ruby-lsp!
149151
sorbet-static-and-runtime
@@ -152,4 +154,4 @@ DEPENDENCIES
152154
test-unit
153155

154156
BUNDLED WITH
155-
2.6.2
157+
2.6.9

lib/ruby_lsp/requests/support/rubocop_runner.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ def run(path, contents)
111111
rescue ::RuboCop::ValidationError => error
112112
raise ConfigurationError, error.message
113113
rescue StandardError => error
114-
raise InternalRuboCopError, error
114+
# Maintain the original backtrace so that debugging cops that are breaking is easier, but re-raise as a
115+
# different error class
116+
internal_error = InternalRuboCopError.new(error)
117+
internal_error.set_backtrace(error.backtrace)
118+
raise internal_error
115119
end
116120

117121
#: -> String

sorbet/rbi/gems/[email protected]

Lines changed: 154 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)