Skip to content

Commit d55ffce

Browse files
authored
Update RuboCop in Gemfile to silence a deprecation warning in build (#870)
The existing version of RuboCop no longer works against other libraries without deprecation warnings; rather than lock more dependencies, upgrade RuboCop used in project. ```sh Running pre-commit hooks Check YAML syntax........................................[YamlSyntax] OK Check Gemfile dependencies..............................[BundleCheck] OK Check for trailing whitespace....................[TrailingWhitespace] OK Analyze with RuboCop........................................[RuboCop] FAILED Unexpected output: unable to determine line number or type of error/warning for output: `EnsureNode#body` is deprecated and will be changed in the next major version of rubocop-ast. Use `EnsureNode#branch` instead to get the body of the `ensure` branch. Called from: /Users/broz/.rbenv/versions/3.1.6/lib/ruby/gems/3.1.0/gems/rubocop-1.63.0/lib/rubocop/cop/layout/indentation_width.rb:67:in `on_ensure' /Users/broz/.rbenv/versions/3.1.6/lib/ruby/gems/3.1.0/gems/rubocop-1.63.0/lib/rubocop/cop/commissioner.rb:107:in `public_send' /Users/broz/.rbenv/versions/3.1.6/lib/ruby/gems/3.1.0/gems/rubocop-1.63.0/lib/rubocop/cop/commissioner.rb:107:in `block (2 levels) in trigger_responding_cops' /Users/broz/.rbenv/versions/3.1.6/lib/ruby/gems/3.1.0/gems/rubocop-1.63.0/lib/rubocop/cop/commissioner.rb:171:in `with_cop_error_handling' /Users/broz/.rbenv/versions/3.1.6/lib/ruby/gems/3.1.0/gems/rubocop-1.63.0/lib/rubocop/cop/commissioner.rb:106:in `block in trigger_responding_cops' /Users/broz/.rbenv/versions/3.1.6/lib/ruby/gems/3.1.0/gems/rubocop-1.63.0/lib/rubocop/cop/commissioner.rb:105:in `each' /Users/broz/.rbenv/versions/3.1.6/lib/ruby/gems/3.1.0/gems/rubocop-1.63.0/lib/rubocop/cop/commissioner.rb:105:in `trigger_responding_cops' [...] ```
1 parent 46c3033 commit d55ffce

File tree

13 files changed

+3
-13
lines changed

13 files changed

+3
-13
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Naming/FileName:
7070

7171
# Renaming `has_something?` to `something?` obfuscates whether it is a "is-a" or
7272
# a "has-a" relationship.
73-
Naming/PredicateName:
73+
Naming/PredicatePrefix:
7474
Enabled: false
7575

7676
# commit_sha1 is indeed how we want to write such a variable, so ignore this cop

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ gem 'simplecov-lcov', '~> 0.8.0'
1515
if RUBY_VERSION < '2.7.0'
1616
gem 'rubocop', '1.50.0'
1717
else
18-
gem 'rubocop', '1.59.0'
18+
gem 'rubocop', '1.77.0'
1919
end
2020

2121
gem 'ffi' if Gem.win_platform?

lib/overcommit/hook/pre_commit/scalastyle.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def run
2424
extract_messages(
2525
messages,
2626
MESSAGE_REGEX,
27-
lambda { |type| type.to_sym }
27+
lambda(&:to_sym)
2828
)
2929
end
3030
end

template-dir/hooks/commit-msg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ if gemfile
4242
exit 78 # EX_CONFIG
4343
end
4444
end
45-
# rubocop:enable Style/RescueModifier
4645

4746
begin
4847
require 'overcommit'

template-dir/hooks/overcommit-hook

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ if gemfile
4242
exit 78 # EX_CONFIG
4343
end
4444
end
45-
# rubocop:enable Style/RescueModifier
4645

4746
begin
4847
require 'overcommit'

template-dir/hooks/post-checkout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ if gemfile
4242
exit 78 # EX_CONFIG
4343
end
4444
end
45-
# rubocop:enable Style/RescueModifier
4645

4746
begin
4847
require 'overcommit'

template-dir/hooks/post-commit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ if gemfile
4242
exit 78 # EX_CONFIG
4343
end
4444
end
45-
# rubocop:enable Style/RescueModifier
4645

4746
begin
4847
require 'overcommit'

template-dir/hooks/post-merge

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ if gemfile
4242
exit 78 # EX_CONFIG
4343
end
4444
end
45-
# rubocop:enable Style/RescueModifier
4645

4746
begin
4847
require 'overcommit'

template-dir/hooks/post-rewrite

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ if gemfile
4242
exit 78 # EX_CONFIG
4343
end
4444
end
45-
# rubocop:enable Style/RescueModifier
4645

4746
begin
4847
require 'overcommit'

template-dir/hooks/pre-commit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ if gemfile
4242
exit 78 # EX_CONFIG
4343
end
4444
end
45-
# rubocop:enable Style/RescueModifier
4645

4746
begin
4847
require 'overcommit'

0 commit comments

Comments
 (0)