rubocop-shopify 2.15.1 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/rubocop-cli.yml +0 -3
  3. data/rubocop.yml +148 -44
  4. metadata +7 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8eabc8ef14da2c1c48ffa6d5a5fc4be36555734429f4dc747f111fef9dbce7a9
4
- data.tar.gz: 435bae5559a688f995d307f2084e8dacb45ccbaa49f0e566732d6c41db09ce28
3
+ metadata.gz: f4c50d5abd221d3325b76205e96dc9ffbaafc36413eee56d73bb17b22468aaae
4
+ data.tar.gz: ac4cf517e6772889eb58a56a32432a6aeb03f08ef9a345e4391f85988c16f3ec
5
5
  SHA512:
6
- metadata.gz: e1000f7c0ac624de18312c0e7c18478c34c13d8fe9717dd8d237cfbceabbf3aa4b165677a2738f10b8580fa6a4996ddc6c1cdee5477992577b88caabec16ec90
7
- data.tar.gz: 013d1bd026ddbc32bebca7e51446f2dcf2a6e2cc34cf659d03a2e161d809e59aa7439fd58150f38952861c56a72b8e985014c04e0ca3c33d27f315f0f34a0cd6
6
+ metadata.gz: 867dbcda091646b9b371a5b934932531ec60ad0cb9c3f15b94811ed1893784f7a69d4a1ed2b2b84288f3d92803da7b4eec3081cdd892995a284fee5ed90fb7b1
7
+ data.tar.gz: 802ab2ba9fabad58a535e80fc612861911a07a77b4a11de685caa4188b215250347b1d0800d6186a6d7e4fe2610101d013f4e1c7fb77432811b21ebeab9ad488
data/rubocop-cli.yml CHANGED
@@ -10,9 +10,6 @@ AllCops:
10
10
  Exclude:
11
11
  - 'vendor/**/*'
12
12
 
13
- # Mac OS Catalina ships with 2.6.3
14
- TargetRubyVersion: 2.6
15
-
16
13
  # We disable this at entrypoint.
17
14
  # Due to CLI apps being invoked via an entry point,
18
15
  # we can exclude this from all files
data/rubocop.yml CHANGED
@@ -16,6 +16,11 @@ AllCops:
16
16
  Bundler/OrderedGems:
17
17
  Enabled: false
18
18
 
19
+ <% if rubocop_version >= "1.65" %>
20
+ Gemspec/AddRuntimeDependency:
21
+ Enabled: false
22
+ <% end %>
23
+
19
24
  Gemspec/DeprecatedAttributeAssignment:
20
25
  Enabled: true
21
26
 
@@ -60,6 +65,11 @@ Layout/FirstMethodArgumentLineBreak:
60
65
  Layout/HashAlignment:
61
66
  EnforcedLastArgumentHashStyle: ignore_implicit
62
67
 
68
+ <% if rubocop_version >= "1.67" %>
69
+ Layout/LeadingCommentSpace:
70
+ AllowRBSInlineAnnotation: true
71
+ <% end %>
72
+
63
73
  Layout/LineContinuationLeadingSpace:
64
74
  Enabled: true
65
75
 
@@ -71,9 +81,7 @@ Layout/LineEndStringConcatenationIndentation:
71
81
  EnforcedStyle: indented
72
82
 
73
83
  Layout/LineLength:
74
- AllowedPatterns:
75
- - "\\A\\s*(remote_)?test(_\\w+)?\\s.*(do|->)(\\s|\\Z)"
76
- - "\\A\\s*def test_\\w+\\s*\\Z"
84
+ Enabled: false
77
85
 
78
86
  Layout/MultilineArrayLineBreaks:
79
87
  Enabled: true
@@ -111,6 +119,11 @@ Lint/AmbiguousOperatorPrecedence:
111
119
  Lint/AmbiguousRange:
112
120
  Enabled: false
113
121
 
122
+ <% if rubocop_version >= "1.71" %>
123
+ Lint/ArrayLiteralInRegexp:
124
+ Enabled: false
125
+ <% end %>
126
+
114
127
  Lint/BooleanSymbol:
115
128
  Enabled: false
116
129
 
@@ -120,6 +133,16 @@ Lint/ConstantDefinitionInBlock:
120
133
  Lint/ConstantOverwrittenInRescue:
121
134
  Enabled: true
122
135
 
136
+ <% if rubocop_version >= "1.70" %>
137
+ Lint/ConstantReassignment:
138
+ Enabled: false
139
+ <% end %>
140
+
141
+ <% if rubocop_version >= "1.72" %>
142
+ Lint/CopDirectiveSyntax:
143
+ Enabled: false
144
+ <% end %>
145
+
123
146
  Lint/DeprecatedConstants:
124
147
  Enabled: false
125
148
 
@@ -150,6 +173,11 @@ Lint/DuplicateRequire:
150
173
  Lint/DuplicateRescueException:
151
174
  Enabled: false
152
175
 
176
+ <% if rubocop_version >= "1.67" %>
177
+ Lint/DuplicateSetElement:
178
+ Enabled: false
179
+ <% end %>
180
+
153
181
  Lint/EmptyBlock:
154
182
  Enabled: false
155
183
 
@@ -180,6 +208,11 @@ Lint/FloatComparison:
180
208
  Lint/HashCompareByIdentity:
181
209
  Enabled: false
182
210
 
211
+ <% if rubocop_version >= "1.69" %>
212
+ Lint/HashNewWithKeywordArgumentsAsDefault:
213
+ Enabled: false
214
+ <% end %>
215
+
183
216
  Lint/IdentityComparison:
184
217
  Enabled: false
185
218
 
@@ -189,23 +222,17 @@ Lint/IncompatibleIoSelectWithFiberScheduler:
189
222
  Lint/InterpolationCheck:
190
223
  Enabled: false
191
224
 
192
- <% if rubocop_version >= "1.59" %>
193
225
  Lint/ItWithoutArgumentsInBlock:
194
226
  Enabled: true
195
- <% end %>
196
227
 
197
228
  Lint/LambdaWithoutLiteralBlock:
198
229
  Enabled: false
199
230
 
200
- <% if rubocop_version >= "1.58" %>
201
231
  Lint/LiteralAssignmentInCondition:
202
232
  Enabled: true
203
- <% end %>
204
233
 
205
- <% if rubocop_version >= "1.53" %>
206
234
  Lint/MixedCaseRange:
207
235
  Enabled: true
208
- <% end %>
209
236
 
210
237
  Lint/MixedRegexpCaptureTypes:
211
238
  Enabled: false
@@ -228,6 +255,11 @@ Lint/NonDeterministicRequireOrder:
228
255
  Lint/NumberedParameterAssignment:
229
256
  Enabled: false
230
257
 
258
+ <% if rubocop_version >= "1.69" %>
259
+ Lint/NumericOperationWithConstantResult:
260
+ Enabled: false
261
+ <% end %>
262
+
231
263
  Lint/OrAssignmentToConstant:
232
264
  Enabled: false
233
265
 
@@ -240,10 +272,8 @@ Lint/RaiseException:
240
272
  Lint/RedundantDirGlobSort:
241
273
  Enabled: false
242
274
 
243
- <% if rubocop_version >= "1.53" %>
244
275
  Lint/RedundantRegexpQuantifiers:
245
276
  Enabled: true
246
- <% end %>
247
277
 
248
278
  Lint/RedundantRequireStatement:
249
279
  Enabled: false
@@ -251,6 +281,11 @@ Lint/RedundantRequireStatement:
251
281
  Lint/RedundantSafeNavigation:
252
282
  Enabled: false
253
283
 
284
+ <% if rubocop_version >= "1.72" %>
285
+ Lint/RedundantTypeConversion:
286
+ Enabled: false
287
+ <% end %>
288
+
254
289
  Lint/RedundantWithIndex:
255
290
  Enabled: false
256
291
 
@@ -296,9 +331,19 @@ Lint/ShadowedArgument:
296
331
  Lint/ShadowingOuterLocalVariable:
297
332
  Enabled: false
298
333
 
334
+ <% if rubocop_version >= "1.70" %>
335
+ Lint/SharedMutableDefault:
336
+ Enabled: false
337
+ <% end %>
338
+
299
339
  Lint/StructNewOverride:
300
340
  Enabled: false
301
341
 
342
+ <% if rubocop_version >= "1.72" %>
343
+ Lint/SuppressedExceptionInNumberConversion:
344
+ Enabled: false
345
+ <% end %>
346
+
302
347
  Lint/SymbolConversion:
303
348
  Enabled: false
304
349
 
@@ -317,6 +362,11 @@ Lint/TrailingCommaInAttributeDeclaration:
317
362
  Lint/TripleQuotes:
318
363
  Enabled: false
319
364
 
365
+ <% if rubocop_version >= "1.68" %>
366
+ Lint/UnescapedBracketInRegexp:
367
+ Enabled: false
368
+ <% end %>
369
+
320
370
  Lint/UnexpectedBlockArity:
321
371
  Enabled: false
322
372
 
@@ -335,9 +385,24 @@ Lint/UriEscapeUnescape:
335
385
  Lint/UriRegexp:
336
386
  Enabled: false
337
387
 
388
+ <% if rubocop_version >= "1.72" %>
389
+ Lint/UselessConstantScoping:
390
+ Enabled: false
391
+ <% end %>
392
+
393
+ <% if rubocop_version >= "1.69" %>
394
+ Lint/UselessDefined:
395
+ Enabled: false
396
+ <% end %>
397
+
338
398
  Lint/UselessMethodDefinition:
339
399
  Enabled: false
340
400
 
401
+ <% if rubocop_version >= "1.66" %>
402
+ Lint/UselessNumericOperation:
403
+ Enabled: false
404
+ <% end %>
405
+
341
406
  Lint/UselessRescue:
342
407
  Enabled: true
343
408
 
@@ -389,21 +454,6 @@ Naming/HeredocDelimiterCase:
389
454
  Naming/HeredocDelimiterNaming:
390
455
  Enabled: false
391
456
 
392
- Naming/InclusiveLanguage:
393
- Enabled: true
394
- FlaggedTerms:
395
- master:
396
- Suggestions:
397
- - main
398
- - primary
399
- - leader
400
- AllowedRegex:
401
- - !ruby/regexp '/master[_\s\.]key/' # Rails master key
402
- - !ruby/regexp /\w*:\/\/\S+/ # URLs (e.g. https://github.com/org/repo/blob/master/README.md)
403
- - !ruby/regexp '/(?:blob|tree)/master/' # e.g. github.com/org/repo/blob/master/README.md, without https://
404
- - !ruby/regexp '/origin[ \/]master/' # Legacy default git branch name
405
- - !ruby/regexp '/(?<=[a-z])master|master(?=[a-z])/' # "master" substring within a longer word
406
-
407
457
  Naming/MemoizedInstanceVariableName:
408
458
  Enabled: false
409
459
 
@@ -447,6 +497,11 @@ Style/AccessorGrouping:
447
497
  Style/Alias:
448
498
  EnforcedStyle: prefer_alias_method
449
499
 
500
+ <% if rubocop_version >= "1.68" %>
501
+ Style/AmbiguousEndlessMethodDefinition:
502
+ Enabled: false
503
+ <% end %>
504
+
450
505
  Style/ArgumentsForwarding:
451
506
  Enabled: false
452
507
 
@@ -456,6 +511,11 @@ Style/ArrayIntersect:
456
511
  Style/BisectedAttrAccessor:
457
512
  Enabled: false
458
513
 
514
+ <% if rubocop_version >= "1.68" %>
515
+ Style/BitwisePredicate:
516
+ Enabled: false
517
+ <% end %>
518
+
459
519
  Style/CaseEquality:
460
520
  AllowOnConstant: true
461
521
  AllowOnSelfClass: true
@@ -476,6 +536,11 @@ Style/CollectionCompact:
476
536
  Style/ColonMethodDefinition:
477
537
  Enabled: false
478
538
 
539
+ <% if rubocop_version >= "1.68" %>
540
+ Style/CombinableDefined:
541
+ Enabled: false
542
+ <% end %>
543
+
479
544
  Style/CombinableLoops:
480
545
  Enabled: false
481
546
 
@@ -497,6 +562,11 @@ Style/DataInheritance:
497
562
  Style/DateTime:
498
563
  Enabled: true
499
564
 
565
+ <% if rubocop_version >= "1.69" %>
566
+ Style/DigChain:
567
+ Enabled: false
568
+ <% end %>
569
+
500
570
  Style/Dir:
501
571
  Enabled: false
502
572
 
@@ -554,9 +624,19 @@ Style/FetchEnvVar:
554
624
  Style/FileEmpty:
555
625
  Enabled: true
556
626
 
627
+ <% if rubocop_version >= "1.69" %>
628
+ Style/FileNull:
629
+ Enabled: false
630
+ <% end %>
631
+
557
632
  Style/FileRead:
558
633
  Enabled: false
559
634
 
635
+ <% if rubocop_version >= "1.69" %>
636
+ Style/FileTouch:
637
+ Enabled: false
638
+ <% end %>
639
+
560
640
  Style/FileWrite:
561
641
  Enabled: false
562
642
 
@@ -591,8 +671,10 @@ Style/HashExcept:
591
671
  Style/HashLikeCase:
592
672
  Enabled: false
593
673
 
594
- Style/HashSyntax:
595
- EnforcedShorthandSyntax: either
674
+ <% if rubocop_version >= "1.71" %>
675
+ Style/HashSlice:
676
+ Enabled: false
677
+ <% end %>
596
678
 
597
679
  Style/HashTransformKeys:
598
680
  Enabled: false
@@ -615,6 +697,16 @@ Style/InverseMethods:
615
697
  Style/InvertibleUnlessCondition:
616
698
  Enabled: true
617
699
 
700
+ <% if rubocop_version >= "1.70" %>
701
+ Style/ItAssignment:
702
+ Enabled: false
703
+ <% end %>
704
+
705
+ <% if rubocop_version >= "1.68" %>
706
+ Style/KeywordArgumentsMerging:
707
+ Enabled: false
708
+ <% end %>
709
+
618
710
  Style/KeywordParametersOrder:
619
711
  Enabled: false
620
712
 
@@ -628,6 +720,11 @@ Style/MagicCommentFormat:
628
720
  Style/MapCompactWithConditionalBlock:
629
721
  Enabled: false
630
722
 
723
+ <% if rubocop_version >= "1.63" %>
724
+ Style/MapIntoArray:
725
+ Enabled: false
726
+ <% end %>
727
+
631
728
  Style/MapToHash:
632
729
  Enabled: false
633
730
 
@@ -730,10 +827,8 @@ Style/RandomWithOffset:
730
827
  Style/RedundantArgument:
731
828
  Enabled: false
732
829
 
733
- <% if rubocop_version >= "1.52" %>
734
830
  Style/RedundantArrayConstructor:
735
831
  Enabled: true
736
- <% end %>
737
832
 
738
833
  Style/RedundantAssignment:
739
834
  Enabled: false
@@ -747,10 +842,8 @@ Style/RedundantConditional:
747
842
  Style/RedundantConstantBase:
748
843
  Enabled: true
749
844
 
750
- <% if rubocop_version >= "1.53" %>
751
845
  Style/RedundantCurrentDirectoryInPath:
752
846
  Enabled: true
753
- <% end %>
754
847
 
755
848
  Style/RedundantDoubleSplatHashBraces:
756
849
  Enabled: true
@@ -764,9 +857,12 @@ Style/RedundantFetchBlock:
764
857
  Style/RedundantFileExtensionInRequire:
765
858
  Enabled: false
766
859
 
767
- <% if rubocop_version >= "1.52" %>
768
860
  Style/RedundantFilterChain:
769
861
  Enabled: true
862
+
863
+ <% if rubocop_version >= "1.72" %>
864
+ Style/RedundantFormat:
865
+ Enabled: false
770
866
  <% end %>
771
867
 
772
868
  Style/RedundantHeredocDelimiterQuotes:
@@ -775,21 +871,22 @@ Style/RedundantHeredocDelimiterQuotes:
775
871
  Style/RedundantInitialize:
776
872
  Enabled: false
777
873
 
874
+ <% if rubocop_version >= "1.66" %>
875
+ Style/RedundantInterpolationUnfreeze:
876
+ Enabled: false
877
+ <% end %>
878
+
778
879
  Style/RedundantLineContinuation:
779
880
  Enabled: true
780
881
 
781
- <% if rubocop_version >= "1.53" %>
782
882
  Style/RedundantRegexpArgument:
783
883
  Enabled: true
784
- <% end %>
785
884
 
786
885
  Style/RedundantRegexpCharacterClass:
787
886
  Enabled: false
788
887
 
789
- <% if rubocop_version >= "1.52" %>
790
888
  Style/RedundantRegexpConstructor:
791
889
  Enabled: true
792
- <% end %>
793
890
 
794
891
  Style/RedundantRegexpEscape:
795
892
  Enabled: false
@@ -815,21 +912,27 @@ Style/RescueStandardError:
815
912
  Style/ReturnNil:
816
913
  Enabled: true
817
914
 
818
- <% if rubocop_version >= "1.53" %>
819
915
  Style/ReturnNilInPredicateMethodDefinition:
820
916
  Enabled: true
917
+
918
+ <% if rubocop_version >= "1.68" %>
919
+ Style/SafeNavigationChainLength:
920
+ Enabled: false
821
921
  <% end %>
822
922
 
823
923
  Style/SelectByRegexp:
824
924
  Enabled: false
825
925
 
926
+ <% if rubocop_version >= "1.64" %>
927
+ Style/SendWithLiteralMethodName:
928
+ Enabled: false
929
+ <% end %>
930
+
826
931
  Style/SingleArgumentDig:
827
932
  Enabled: false
828
933
 
829
- <% if rubocop_version >= "1.57" %>
830
934
  Style/SingleLineDoEndBlock:
831
935
  Enabled: true
832
- <% end %>
833
936
 
834
937
  Style/SlicingWithRange:
835
938
  Enabled: false
@@ -855,10 +958,13 @@ Style/StringLiteralsInInterpolation:
855
958
  Style/StructInheritance:
856
959
  Enabled: false
857
960
 
858
- <% if rubocop_version >= "1.58" %>
961
+ <% if rubocop_version >= "1.64" %>
962
+ Style/SuperArguments:
963
+ Enabled: false
964
+ <% end %>
965
+
859
966
  Style/SuperWithArgsParentheses:
860
967
  Enabled: true
861
- <% end %>
862
968
 
863
969
  Style/SwapValues:
864
970
  Enabled: false
@@ -890,10 +996,8 @@ Style/UnpackFirst:
890
996
  Style/WordArray:
891
997
  EnforcedStyle: brackets
892
998
 
893
- <% if rubocop_version >= "1.53" %>
894
999
  Style/YAMLFileRead:
895
1000
  Enabled: true
896
- <% end %>
897
1001
 
898
1002
  Style/YodaCondition:
899
1003
  Enabled: false
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-shopify
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.1
4
+ version: 2.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify Engineering
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-02-15 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rubocop
@@ -16,14 +15,14 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '1.51'
18
+ version: '1.62'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: '1.51'
25
+ version: '1.62'
27
26
  description: Gem containing the rubocop.yml config that corresponds to the implementation
28
27
  of the Shopify's style guide for Ruby.
29
28
  email: gems@shopify.com
@@ -41,9 +40,8 @@ homepage: https://shopify.github.io/ruby-style-guide/
41
40
  licenses:
42
41
  - MIT
43
42
  metadata:
44
- source_code_uri: https://github.com/Shopify/ruby-style-guide/tree/v2.15.1
43
+ source_code_uri: https://github.com/Shopify/ruby-style-guide/tree/v2.17.0
45
44
  allowed_push_host: https://rubygems.org
46
- post_install_message:
47
45
  rdoc_options: []
48
46
  require_paths:
49
47
  - lib
@@ -51,15 +49,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
51
49
  requirements:
52
50
  - - ">="
53
51
  - !ruby/object:Gem::Version
54
- version: 2.7.0
52
+ version: 3.1.0
55
53
  required_rubygems_version: !ruby/object:Gem::Requirement
56
54
  requirements:
57
55
  - - ">="
58
56
  - !ruby/object:Gem::Version
59
57
  version: '0'
60
58
  requirements: []
61
- rubygems_version: 3.5.6
62
- signing_key:
59
+ rubygems_version: 3.6.8
63
60
  specification_version: 4
64
61
  summary: Shopify's style guide for Ruby.
65
62
  test_files: []