Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rubocop to 1.71.2 #374

Open
wants to merge 1 commit into
base: channel/beta
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
inherit_from: base_rubocop.yml

require: rubocop-rspec

inherit_from:
- .rubocop_todo.yml
- base_rubocop.yml

Layout/MultilineOperationIndentation:
Enabled: false

Naming/HeredocDelimiterNaming:
Enabled: false

Naming/FileName:
Exclude:
- 'bin/codeclimate-rubocop'
@@ -20,3 +25,24 @@ Style/TrailingCommaInHashLiteral:

Style/TrailingCommaInArguments:
Enabled: false

RSpec/AnyInstance:
Enabled: false

RSpec/ContextWording:
Enabled: false

RSpec/DescribedClass:
Enabled: false

RSpec/ExampleLength:
Enabled: false

RSpec/MessageChain:
Enabled: false

RSpec/MultipleExpectations:
Enabled: false

RSpec/NotToNot:
Enabled: false
13 changes: 13 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2024-11-08 23:41:07 UTC using RuboCop version 1.68.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# Configuration parameters: AllowComments, AllowNil.
Lint/SuppressedException:
Exclude:
- 'Rakefile'
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ source 'https://rubygems.org'
gem "activesupport", require: false
gem "parser"
gem "pry", require: false
gem "rubocop", "1.64.1", require: false
gem "rubocop", "1.73.2", require: false
gem "rubocop-capybara", require: false
gem "rubocop-factory_bot", require: false
gem "rubocop-graphql", require: false
@@ -24,6 +24,7 @@ gem "rubocop-thread_safety", require: false
gem "test-prof", require: false

group :test do
gem "ostruct", require: false
gem "rake"
gem "rspec"
end
152 changes: 84 additions & 68 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,127 +1,143 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3.4)
activesupport (8.0.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.8)
benchmark (0.4.0)
bigdecimal (3.1.9)
coderay (1.1.3)
concurrent-ruby (1.3.3)
connection_pool (2.4.1)
diff-lcs (1.5.1)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
diff-lcs (1.6.0)
drb (2.2.1)
i18n (1.14.5)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
json (2.10.1)
language_server-protocol (3.17.0.4)
lint_roller (1.1.0)
logger (1.6.6)
method_source (1.1.0)
minitest (5.24.1)
mutex_m (0.2.0)
parallel (1.25.1)
parser (3.3.3.0)
minitest (5.25.4)
ostruct (0.6.1)
parallel (1.26.3)
parser (3.3.7.1)
ast (~> 2.4.1)
racc
pry (0.14.2)
pry (0.15.2)
coderay (~> 1.1)
method_source (~> 1.0)
racc (1.8.0)
rack (3.1.4)
racc (1.8.1)
rack (3.1.11)
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.9.2)
rexml (3.3.1)
strscan
regexp_parser (2.10.0)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-core (3.13.3)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
rspec-mocks (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rubocop (1.64.1)
rspec-support (3.13.2)
rubocop (1.73.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.38.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.38.1)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
rubocop-graphql (1.5.2)
rubocop (>= 0.90, < 2)
rubocop-i18n (3.0.0)
rubocop (~> 1.0)
rubocop-minitest (0.35.0)
rubocop (>= 1.61, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.25.1)
rubocop-factory_bot (2.27.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-graphql (1.5.4)
rubocop (>= 1.50, < 2)
rubocop-i18n (3.2.3)
lint_roller (~> 1.1)
rubocop (>= 1.72.1)
rubocop-minitest (0.37.1)
lint_roller (~> 1.1)
rubocop (>= 1.72.1, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0)
rubocop-performance (1.24.0)
lint_roller (~> 1.1)
rubocop (>= 1.72.1, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0)
rubocop-rails (2.30.3)
activesupport (>= 4.2.0)
lint_roller (~> 1.1)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails-omakase (1.0.0)
rubocop
rubocop-minitest
rubocop-performance
rubocop-rails
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (3.0.1)
rubocop (~> 1.61)
rubocop (>= 1.72.1, < 2.0)
rubocop-ast (>= 1.38.0, < 2.0)
rubocop-rails-omakase (1.1.0)
rubocop (>= 1.72)
rubocop-performance (>= 1.24)
rubocop-rails (>= 2.30)
rubocop-rake (0.7.1)
lint_roller (~> 1.1)
rubocop (>= 1.72.1)
rubocop-rspec (3.5.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
rubocop-rspec (~> 3, >= 3.0.1)
rubocop-sequel (0.3.4)
rubocop (~> 1.0)
rubocop-shopify (2.15.1)
rubocop (~> 1.51)
rubocop-sorbet (0.8.3)
rubocop (>= 0.90.0)
rubocop-thread_safety (0.5.1)
rubocop (>= 0.90.0)
rubocop-sequel (0.4.0)
lint_roller (~> 1.1)
rubocop (>= 1.72.1, < 1.74.0)
rubocop-shopify (2.16.0)
rubocop (~> 1.62)
rubocop-sorbet (0.8.9)
rubocop (>= 1)
rubocop-thread_safety (0.7.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
ruby-progressbar (1.13.0)
strscan (3.1.0)
test-prof (1.3.3.1)
securerandom (0.4.1)
test-prof (1.4.4)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.3)

PLATFORMS
ruby

DEPENDENCIES
activesupport
ostruct
parser
pry
rake
rspec
rubocop (= 1.64.1)
rubocop (= 1.73.2)
rubocop-capybara
rubocop-factory_bot
rubocop-graphql
2 changes: 1 addition & 1 deletion bin/codeclimate-rubocop
Original file line number Diff line number Diff line change
@@ -14,4 +14,4 @@ engine_config =
{}
end

CC::Engine::Rubocop.new(Dir.pwd, engine_config, STDOUT).run
CC::Engine::Rubocop.new(Dir.pwd, engine_config, $stdout).run
14 changes: 14 additions & 0 deletions config/contents/gemspec/add_runtime_dependency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Prefer `add_dependency` over `add_runtime_dependency` as the latter is
considered soft-deprecated.

### Example:

# bad
Gem::Specification.new do |spec|
spec.add_runtime_dependency('rubocop')
end

# good
Gem::Specification.new do |spec|
spec.add_dependency('rubocop')
end
4 changes: 2 additions & 2 deletions config/contents/gemspec/duplicated_assignment.md
Original file line number Diff line number Diff line change
@@ -26,6 +26,6 @@ permitted because it is the intended use of appending values.

# good
Gem::Specification.new do |spec|
spec.add_runtime_dependency('parallel', '~> 1.10')
spec.add_runtime_dependency('parser', '>= 2.3.3.1', '< 3.0')
spec.add_dependency('parallel', '~> 1.10')
spec.add_dependency('parser', '>= 2.3.3.1', '< 3.0')
end
6 changes: 3 additions & 3 deletions config/contents/gemspec/ruby_version_globals_usage.md
Original file line number Diff line number Diff line change
@@ -9,13 +9,13 @@ to execute `rake release` and not user's ruby version.
# bad
Gem::Specification.new do |spec|
if RUBY_VERSION >= '3.0'
spec.add_runtime_dependency 'gem_a'
spec.add_dependency 'gem_a'
else
spec.add_runtime_dependency 'gem_b'
spec.add_dependency 'gem_b'
end
end

# good
Gem::Specification.new do |spec|
spec.add_runtime_dependency 'gem_a'
spec.add_dependency 'gem_a'
end
2 changes: 1 addition & 1 deletion config/contents/layout/access_modifier_indentation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Bare access modifiers (those not applying to specific methods) should be
indented as deep as method definitions, or as deep as the class/module
indented as deep as method definitions, or as deep as the `class`/`module`
keyword, depending on configuration.

### Example: EnforcedStyle: indent (default)
3 changes: 1 addition & 2 deletions config/contents/layout/argument_alignment.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Here we check if the arguments on a multi-line method
definition are aligned.
Check that the arguments on a multi-line method call are aligned.

### Example: EnforcedStyle: with_first_argument (default)
# good
2 changes: 1 addition & 1 deletion config/contents/layout/array_alignment.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Here we check if the elements of a multi-line array literal are
Check that the elements of a multi-line array literal are
aligned.

### Example: EnforcedStyle: with_first_element (default)
6 changes: 3 additions & 3 deletions config/contents/layout/assignment_indentation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Checks the indentation of the first line of the
right-hand-side of a multi-line assignment.

The indentation of the remaining lines can be corrected with
other cops such as `Layout/IndentationConsistency` and `Layout/EndAlignment`.

### Example:
# bad
value =
@@ -13,6 +16,3 @@ right-hand-side of a multi-line assignment.
if foo
'bar'
end

The indentation of the remaining lines can be corrected with
other cops such as `IndentationConsistency` and `EndAlignment`.
2 changes: 1 addition & 1 deletion config/contents/layout/block_alignment.md
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ start of the line where the `do` appeared.
start of the line where the expression started.

`either` (which is the default) : the `end` is allowed to be in either
location. The autofixer will default to `start_of_line`.
location. The autocorrect will default to `start_of_line`.

### Example: EnforcedStyleAlignWith: either (default)
# bad
Loading
Oops, something went wrong.