Skip to content

Commit

Permalink
Update rubocop to 1.50.2 (#355)
Browse files Browse the repository at this point in the history
- General bundle update.
- Update the docs too.
- Add standard gem. Note this limits the rubocop-performance version.
  Fixes #351.
  • Loading branch information
BrianHawley authored May 11, 2023
1 parent 975a1bd commit 95784bc
Show file tree
Hide file tree
Showing 25 changed files with 441 additions and 344 deletions.
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.48.1", require: false
gem "rubocop", "1.50.2", require: false
gem "rubocop-i18n", require: false
gem "rubocop-graphql", require: false
gem "rubocop-minitest", require: false
Expand All @@ -17,6 +17,7 @@ gem "rubocop-sequel", require: false
gem "rubocop-shopify", require: false
gem "rubocop-sorbet", require: false
gem "rubocop-thread_safety", require: false
gem "standard", ">= 1.0", require: false
gem "test-prof", require: false

group :test do
Expand Down
59 changes: 38 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,77 +10,93 @@ GEM
coderay (1.1.3)
concurrent-ruby (1.2.2)
diff-lcs (1.5.0)
i18n (1.12.0)
i18n (1.13.0)
concurrent-ruby (~> 1.0)
json (2.6.3)
language_server-protocol (3.17.0.3)
lint_roller (1.0.0)
method_source (1.0.0)
minitest (5.18.0)
parallel (1.22.1)
parser (3.2.1.1)
parallel (1.23.0)
parser (3.2.2.1)
ast (~> 2.4.1)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
rack (3.0.7)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.7.0)
regexp_parser (2.8.0)
rexml (3.2.5)
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.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (1.48.1)
rubocop (1.50.2)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.2.0.0)
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.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.27.0)
rubocop-ast (1.28.1)
parser (>= 3.2.1.0)
rubocop-capybara (2.17.1)
rubocop-capybara (2.18.0)
rubocop (~> 1.41)
rubocop-graphql (1.0.1)
rubocop-factory_bot (2.22.0)
rubocop (~> 1.33)
rubocop-graphql (1.1.1)
rubocop (>= 0.87, < 2)
rubocop-i18n (3.0.0)
rubocop (~> 1.0)
rubocop-minitest (0.29.0)
rubocop-minitest (0.31.0)
rubocop (>= 1.39, < 2.0)
rubocop-performance (1.16.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.18.0)
rubocop-rails (2.19.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.19.0)
rubocop-rspec (2.22.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-sequel (0.3.4)
rubocop (~> 1.0)
rubocop-shopify (2.12.0)
rubocop (~> 1.44)
rubocop-shopify (2.13.0)
rubocop (~> 1.50)
rubocop-sorbet (0.7.0)
rubocop (>= 0.90.0)
rubocop-thread_safety (0.4.4)
rubocop (>= 0.53.0)
rubocop-thread_safety (0.5.1)
rubocop (>= 0.90.0)
ruby-progressbar (1.13.0)
test-prof (1.2.0)
standard (1.28.2)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50.2)
standard-custom (~> 1.0.0)
standard-performance (~> 1.0.1)
standard-custom (1.0.0)
lint_roller (~> 1.0)
standard-performance (1.0.1)
lint_roller (~> 1.0)
rubocop-performance (~> 1.16.0)
test-prof (1.2.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
Expand All @@ -94,7 +110,7 @@ DEPENDENCIES
pry
rake
rspec
rubocop (= 1.48.1)
rubocop (= 1.50.2)
rubocop-graphql
rubocop-i18n
rubocop-minitest
Expand All @@ -106,6 +122,7 @@ DEPENDENCIES
rubocop-shopify
rubocop-sorbet
rubocop-thread_safety
standard (>= 1.0)
test-prof

BUNDLED WITH
Expand Down
2 changes: 1 addition & 1 deletion config/contents/gemspec/deprecated_attribute_assignment.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Checks that deprecated attribute attributes are not set in a gemspec file.
Checks that deprecated attributes are not set in a gemspec file.
Removing deprecated attributes allows the user to receive smaller packed gems.

### Example:
Expand Down
60 changes: 25 additions & 35 deletions config/contents/layout/first_array_element_line_break.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,36 @@
Checks for a line break before the first element in a
multi-line array.

### Example: AllowMultilineFinalElement: false (default)

# bad
[ :a,
:b]

# bad
[ :a, {
:b => :c
}]
### Example:

# good
[:a, :b]
# bad
[ :a,
:b]

# good
[
:a,
:b]
# good
[
:a,
:b]

# good
[
:a, {
:b => :c
}]
# good
[:a, :b]

### Example: AllowMultilineFinalElement: true
### Example: AllowMultilineFinalElement: false (default)

# bad
[ :a,
:b]
# bad
[ :a, {
:b => :c
}]

# good
[ :a, {
:b => :c
}]
# good
[
:a, {
:b => :c
}]

# good
[
:a,
:b]
### Example: AllowMultilineFinalElement: true

# good
[:a, :b]
# good
[:a, {
:b => :c
}]
27 changes: 7 additions & 20 deletions config/contents/layout/first_hash_element_line_break.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
Checks for a line break before the first element in a
multi-line hash.

### Example: AllowMultilineFinalElement: false (default)
### Example:

# bad
{ a: 1,
b: 2}

# bad
{ a: 1, b: {
c: 3
}}

# good
{
a: 1,
Expand All @@ -23,11 +18,14 @@ multi-line hash.
c: 3
}}

### Example: AllowMultilineFinalElement: true
### Example: AllowMultilineFinalElement: false (default)

# bad
{ a: 1,
b: 2}
{ a: 1, b: {
c: 3
}}

### Example: AllowMultilineFinalElement: true

# bad
{ a: 1,
Expand All @@ -39,14 +37,3 @@ multi-line hash.
{ a: 1, b: {
c: 3
}}

# good
{
a: 1,
b: 2 }

# good
{
a: 1, b: {
c: 3
}}
99 changes: 44 additions & 55 deletions config/contents/layout/first_method_argument_line_break.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,59 @@
Checks for a line break before the first argument in a
multi-line method call.

### Example: AllowMultilineFinalElement: false (default)
### Example:

# bad
method(foo, bar,
baz)
# bad
method(foo, bar,
baz)

# bad
method(foo, bar, {
baz: "a",
qux: "b",
})

# good
method(
foo, bar,
baz)

# good
method(
foo, bar, {
baz: "a",
qux: "b",
})
# good
method(
foo, bar,
baz)

# ignored
method foo, bar,
baz

### Example: AllowMultilineFinalElement: true
### Example: AllowMultilineFinalElement: false (default)

# bad
method(foo, bar,
baz)
# bad
method(foo, bar, {
baz: "a",
qux: "b",
})

# bad
method(foo,
bar,
{
baz: "a",
qux: "b",
}
)
# good
method(
foo, bar, {
baz: "a",
qux: "b",
})

# good
method(foo, bar, {
### Example: AllowMultilineFinalElement: true

# bad
method(foo,
bar,
{
baz: "a",
qux: "b",
})

# good
method(
foo, bar,
baz)

# good
method(
foo,
bar,
{
baz: "a",
qux: "b",
}
)

# ignored
method foo, bar,
baz
}
)

# good
method(foo, bar, {
baz: "a",
qux: "b",
})

# good
method(
foo,
bar,
{
baz: "a",
qux: "b",
}
)
Loading

0 comments on commit 95784bc

Please sign in to comment.