Skip to content

Commit 4d99a76

Browse files
authored
Merge pull request #745 from Shopify/dependabot/bundler/rubocop-0f5777c4c7
2 parents 01ed7c4 + f92b332 commit 4d99a76

File tree

3 files changed

+33
-5
lines changed

3 files changed

+33
-5
lines changed

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ GEM
2323
rainbow (3.1.1)
2424
rake (13.3.0)
2525
regexp_parser (2.10.0)
26-
rubocop (1.76.0)
26+
rubocop (1.77.0)
2727
json (~> 2.3)
2828
language_server-protocol (~> 3.17.0.2)
2929
lint_roller (~> 1.1.0)
3030
parallel (~> 1.10)
3131
parser (>= 3.3.0.2)
3232
rainbow (>= 2.2.2, < 4.0)
3333
regexp_parser (>= 2.9.3, < 3.0)
34-
rubocop-ast (>= 1.45.0, < 2.0)
34+
rubocop-ast (>= 1.45.1, < 2.0)
3535
ruby-progressbar (~> 1.7)
3636
unicode-display_width (>= 2.4.0, < 4.0)
37-
rubocop-ast (1.45.0)
37+
rubocop-ast (1.45.1)
3838
parser (>= 3.3.7.2)
3939
prism (~> 1.4)
4040
rubocop-minitest (0.38.1)

rubocop.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ Bundler/OrderedGems:
2323
Gemspec/AddRuntimeDependency:
2424
Enabled: false
2525

26+
<% if rubocop_version >= '1.77' %>
27+
Gemspec/AttributeAssignment:
28+
Enabled: true
29+
<% end %>
30+
2631
Gemspec/DeprecatedAttributeAssignment:
2732
Enabled: true
2833

@@ -697,6 +702,11 @@ Style/ClassVars:
697702
Style/CollectionCompact:
698703
Enabled: false
699704

705+
<% if rubocop_version >= '1.77' %>
706+
Style/CollectionQuerying:
707+
Enabled: true
708+
<% end %>
709+
700710
Style/ColonMethodCall:
701711
Enabled: false
702712

test/fixtures/full_config.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,12 @@ Gemspec/AddRuntimeDependency:
194194
VersionAdded: '1.65'
195195
Include:
196196
- "**/*.gemspec"
197+
Gemspec/AttributeAssignment:
198+
Description: Use consistent style for Gemspec attributes assignment.
199+
Enabled: true
200+
VersionAdded: '1.77'
201+
Include:
202+
- "**/*.gemspec"
197203
Gemspec/DependencyVersion:
198204
Description: Requires or forbids specifying gem dependency versions.
199205
Enabled: false
@@ -742,6 +748,7 @@ Layout/LineLength:
742748
Max: 120
743749
AllowHeredoc: true
744750
AllowURI: true
751+
AllowQualifiedName: true
745752
URISchemes:
746753
- http
747754
- https
@@ -1776,6 +1783,7 @@ Lint/SelfAssignment:
17761783
Description: Checks for self-assignments.
17771784
Enabled: true
17781785
VersionAdded: '0.89'
1786+
AllowRBSInlineAnnotation: false
17791787
Lint/SendWithMixinArgument:
17801788
Description: Checks for `send` method when using mixin.
17811789
Enabled: true
@@ -2019,7 +2027,7 @@ Metrics/AbcSize:
20192027
Description: A calculated magnitude based on number of assignments, branches, and
20202028
conditions.
20212029
References:
2022-
- http://c2.com/cgi/wiki?AbcMetric
2030+
- https://wiki.c2.com/?AbcMetric
20232031
- https://en.wikipedia.org/wiki/ABC_Software_Metric
20242032
Enabled: false
20252033
VersionAdded: '0.27'
@@ -2326,9 +2334,12 @@ Naming/PredicateMethod:
23262334
do not.
23272335
Enabled: false
23282336
VersionAdded: '1.76'
2337+
VersionChanged: '1.76'
23292338
Mode: conservative
23302339
AllowedMethods:
23312340
- call
2341+
AllowedPatterns: []
2342+
AllowBangMethods: false
23322343
Naming/PredicatePrefix:
23332344
Description: Predicate method names should not be prefixed and end with a `?`.
23342345
StyleGuide: "#bool-methods-qmark"
@@ -2729,6 +2740,12 @@ Style/CollectionMethods:
27292740
MethodsAcceptingSymbol:
27302741
- inject
27312742
- reduce
2743+
Style/CollectionQuerying:
2744+
Description: Prefer `Enumerable` predicate methods over expressions with `count`.
2745+
StyleGuide: "#collection-querying"
2746+
Enabled: true
2747+
VersionAdded: '1.77'
2748+
Safe: false
27322749
Style/ColonMethodCall:
27332750
Description: 'Do not use :: for method call.'
27342751
StyleGuide: "#double-colons"
@@ -3045,6 +3062,7 @@ Style/FetchEnvVar:
30453062
Enabled: false
30463063
VersionAdded: '1.28'
30473064
AllowedVars: []
3065+
DefaultToNil: true
30483066
Style/FileEmpty:
30493067
Description: Prefer to use `File.empty?('path/to/file')` when checking if a file
30503068
is empty.
@@ -3793,7 +3811,7 @@ Style/OpenStructUse:
37933811
Description: Avoid using OpenStruct. As of Ruby 3.0, use is officially discouraged
37943812
due to performance, version compatibility, and potential security issues.
37953813
References:
3796-
- https://docs.ruby-lang.org/en/3.0.0/OpenStruct.html#class-OpenStruct-label-Caveats
3814+
- https://docs.ruby-lang.org/en/3.0/OpenStruct.html#class-OpenStruct-label-Caveats
37973815
Enabled: false
37983816
Safe: false
37993817
VersionAdded: '1.23'

0 commit comments

Comments
 (0)