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.69.1 #374

Open
wants to merge 1 commit into
base: channel/beta
Choose a base branch
from
Open
Show file tree
Hide file tree
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'
Expand All @@ -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
Expand Up @@ -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.69.1", require: false
gem "rubocop-capybara", require: false
gem "rubocop-factory_bot", require: false
gem "rubocop-graphql", require: false
Expand All @@ -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
92 changes: 49 additions & 43 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,89 +1,91 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3.4)
activesupport (8.0.0)
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)
benchmark (0.4.0)
bigdecimal (3.1.8)
coderay (1.1.3)
concurrent-ruby (1.3.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
diff-lcs (1.5.1)
drb (2.2.1)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
json (2.7.2)
json (2.9.0)
language_server-protocol (3.17.0.3)
logger (1.6.2)
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.3)
ostruct (0.6.1)
parallel (1.26.3)
parser (3.3.6.0)
ast (~> 2.4.1)
racc
pry (0.14.2)
pry (0.15.0)
coderay (~> 1.1)
method_source (~> 1.0)
racc (1.8.0)
rack (3.1.4)
racc (1.8.1)
rack (3.1.8)
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.9.2)
rexml (3.3.1)
strscan
regexp_parser (2.9.3)
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.2)
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.69.1)
json (~> 2.3)
language_server-protocol (>= 3.17.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.36.2, < 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.36.2)
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-graphql (1.5.4)
rubocop (>= 1.50, < 2)
rubocop-i18n (3.0.0)
rubocop (~> 1.0)
rubocop-minitest (0.35.0)
rubocop-minitest (0.36.0)
rubocop (>= 1.61, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-performance (1.21.1)
rubocop-performance (1.23.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails (2.25.1)
rubocop-rails (2.27.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails-omakase (1.0.0)
rubocop
Expand All @@ -92,36 +94,40 @@ GEM
rubocop-rails
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (3.0.1)
rubocop-rspec (3.2.0)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
rubocop-rspec (~> 3, >= 3.0.1)
rubocop-sequel (0.3.4)
rubocop-sequel (0.3.7)
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-sorbet (0.8.7)
rubocop (>= 1)
rubocop-thread_safety (0.6.0)
rubocop (>= 1.48.1)
ruby-progressbar (1.13.0)
strscan (3.1.0)
test-prof (1.3.3.1)
securerandom (0.4.0)
test-prof (1.4.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (3.1.2)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.2)

PLATFORMS
ruby

DEPENDENCIES
activesupport
ostruct
parser
pry
rake
rspec
rubocop (= 1.64.1)
rubocop (= 1.69.1)
rubocop-capybara
rubocop-factory_bot
rubocop-graphql
Expand Down
2 changes: 1 addition & 1 deletion bin/codeclimate-rubocop
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Up @@ -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
Expand Up @@ -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
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 definition are aligned.

### Example: EnforcedStyle: with_first_argument (default)
# good
Expand Down
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)
Expand Down
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 =
Expand All @@ -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
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions config/contents/layout/condition_position.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,12 @@ if/while/until.
### Example:

# bad

if
some_condition
do_something
end

### Example:

# good

if some_condition
do_something
end
4 changes: 2 additions & 2 deletions config/contents/layout/first_argument_indentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ This cop will respect `Layout/ArgumentAlignment` and will not work when

### Example: EnforcedStyle: special_for_inner_method_call
# The first argument should normally be indented one step more than
# the preceding line, but if it's a argument for a method call that
# is itself a argument in a method call, then the inner argument
# the preceding line, but if it's an argument for a method call that
# is itself an argument in a method call, then the inner argument
# should be indented relative to the inner method.

# good
Expand Down
3 changes: 0 additions & 3 deletions config/contents/layout/first_array_element_indentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ styles are 'consistent' and 'align_brackets'. Here are examples:
# defined inside a method call.

# bad
# consistent
array = [
:value
]
Expand All @@ -67,13 +66,11 @@ styles are 'consistent' and 'align_brackets'. Here are examples:
# brackets are indented to the same position.

# bad
# align_brackets
and_now_for_something = [
:completely_different
]

# good
# align_brackets
and_now_for_something = [
:completely_different
]
Loading