rubocop-shopify 2.6.0 → 2.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +21 -0
  3. data/rubocop.yml +102 -14
  4. metadata +7 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27e2888826f579c69efbf5df48f4f1f40630ae20f9d962cfde7ab86f08dbdeb7
4
- data.tar.gz: 90e1f14c3f766ca65058237f9d28d6157017101709177d4bacf9bdc997e39a3c
3
+ metadata.gz: 942dce94db368b872f9ea964f76636215e71629cbaf4de313464fca664ad4a29
4
+ data.tar.gz: d9de136a56fd72cff7892a14bab9c186c9432582d0ef9efd5bb028db628e1dfe
5
5
  SHA512:
6
- metadata.gz: 357cf572615207e7cc87f3fd47a1c0b58a1027eb017691ff1a05f1a081edbed5f88a5c3e70c5a5af603957eb3b56b9d73521fe1bede2ea89880bcdcc7227b149
7
- data.tar.gz: 1e6526dd264bd0cfb29b26f7ca1dadf645ca12ff073cdfcb3108791b09e6a28c38d25589c449b65acec6ec6be27edbc9bf83c4a6c3724952aee96c2da3bd7c28
6
+ metadata.gz: 5203fa9ff71fd237d3704146d16baee5bafd448519729ab30c0d660b9705edec24cd22564a53617bf1b898f0aa53648306899451ee32460a53344bdfec2300ae
7
+ data.tar.gz: 781744afcd2e317a9368a73e948ef663668bad5c9e943b4ef7c7f2893dc0b44fad95b46cef48a88d2d524ee5013040ea39f652662e1ed691f5665856ab765c31
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2015-2022 Shopify Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/rubocop.yml CHANGED
@@ -9,15 +9,18 @@ AllCops:
9
9
  Bundler/OrderedGems:
10
10
  Enabled: false
11
11
 
12
- Gemspec/DateAssignment:
12
+ Gemspec/DeprecatedAttributeAssignment:
13
13
  Enabled: true
14
14
 
15
- Gemspec/RequiredRubyVersion:
15
+ Gemspec/DevelopmentDependencies:
16
16
  Enabled: false
17
17
 
18
18
  Gemspec/RequireMFA:
19
19
  Enabled: false
20
20
 
21
+ Gemspec/RequiredRubyVersion:
22
+ Enabled: false
23
+
21
24
  Layout/ArgumentAlignment:
22
25
  EnforcedStyle: with_fixed_indentation
23
26
 
@@ -28,17 +31,34 @@ Layout/EndAlignment:
28
31
  EnforcedStyleAlignWith: variable
29
32
 
30
33
  Layout/FirstArgumentIndentation:
31
- Enabled: false
34
+ EnforcedStyle: consistent
32
35
 
33
36
  Layout/FirstArrayElementIndentation:
34
37
  EnforcedStyle: consistent
35
38
 
39
+ Layout/FirstArrayElementLineBreak:
40
+ Enabled: true
41
+ AllowMultilineFinalElement: true
42
+
36
43
  Layout/FirstHashElementIndentation:
37
44
  EnforcedStyle: consistent
38
45
 
46
+ Layout/FirstHashElementLineBreak:
47
+ Enabled: true
48
+
49
+ Layout/FirstMethodArgumentLineBreak:
50
+ Enabled: true
51
+ AllowMultilineFinalElement: true
52
+
39
53
  Layout/HashAlignment:
40
54
  EnforcedLastArgumentHashStyle: ignore_implicit
41
55
 
56
+ Layout/LineContinuationLeadingSpace:
57
+ Enabled: false
58
+
59
+ Layout/LineContinuationSpacing:
60
+ Enabled: false
61
+
42
62
  Layout/LineEndStringConcatenationIndentation:
43
63
  Enabled: true
44
64
  EnforcedStyle: indented
@@ -48,6 +68,17 @@ Layout/LineLength:
48
68
  AllowedPatterns:
49
69
  - "\\A\\s*(remote_)?test(_\\w+)?\\s.*(do|->)(\\s|\\Z)"
50
70
 
71
+ Layout/MultilineArrayLineBreaks:
72
+ Enabled: true
73
+ AllowMultilineFinalElement: true
74
+
75
+ Layout/MultilineHashKeyLineBreaks:
76
+ Enabled: true
77
+
78
+ Layout/MultilineMethodArgumentLineBreaks:
79
+ Enabled: true
80
+ AllowMultilineFinalElement: true
81
+
51
82
  Layout/MultilineMethodCallIndentation:
52
83
  EnforcedStyle: indented
53
84
  IndentationWidth: 2
@@ -79,6 +110,9 @@ Lint/BooleanSymbol:
79
110
  Lint/ConstantDefinitionInBlock:
80
111
  Enabled: false
81
112
 
113
+ Lint/ConstantOverwrittenInRescue:
114
+ Enabled: true
115
+
82
116
  Lint/DeprecatedConstants:
83
117
  Enabled: false
84
118
 
@@ -94,6 +128,9 @@ Lint/DuplicateCaseCondition:
94
128
  Lint/DuplicateElsifCondition:
95
129
  Enabled: false
96
130
 
131
+ Lint/DuplicateMagicComment:
132
+ Enabled: true
133
+
97
134
  Lint/DuplicateRegexpCharacterClassElement:
98
135
  Enabled: false
99
136
 
@@ -145,9 +182,6 @@ Lint/InterpolationCheck:
145
182
  Lint/LambdaWithoutLiteralBlock:
146
183
  Enabled: false
147
184
 
148
- Lint/MissingCopEnableDirective:
149
- Enabled: false
150
-
151
185
  Lint/MixedRegexpCaptureTypes:
152
186
  Enabled: false
153
187
 
@@ -160,6 +194,9 @@ Lint/NestedPercentLiteral:
160
194
  Lint/NoReturnInBeginEndBlocks:
161
195
  Enabled: false
162
196
 
197
+ Lint/NonAtomicFileOperation:
198
+ Enabled: false
199
+
163
200
  Lint/NonDeterministicRequireOrder:
164
201
  Enabled: false
165
202
 
@@ -196,6 +233,9 @@ Lint/RefinementImportMethods:
196
233
  Lint/RegexpAsCondition:
197
234
  Enabled: false
198
235
 
236
+ Lint/RequireRangeParentheses:
237
+ Enabled: true
238
+
199
239
  Lint/RequireRelativeSelfPath:
200
240
  Enabled: true
201
241
 
@@ -268,6 +308,9 @@ Lint/UriRegexp:
268
308
  Lint/UselessMethodDefinition:
269
309
  Enabled: false
270
310
 
311
+ Lint/UselessRescue:
312
+ Enabled: true
313
+
271
314
  Lint/UselessRuby2Keywords:
272
315
  Enabled: true
273
316
 
@@ -349,12 +392,12 @@ Naming/VariableNumber:
349
392
  Security/CompoundHash:
350
393
  Enabled: false
351
394
 
352
- Security/MarshalLoad:
353
- Enabled: false
354
-
355
395
  Security/IoMethods:
356
396
  Enabled: true
357
397
 
398
+ Security/MarshalLoad:
399
+ Enabled: false
400
+
358
401
  Security/YAMLLoad:
359
402
  Enabled: false
360
403
 
@@ -373,11 +416,15 @@ Style/AndOr:
373
416
  Style/ArgumentsForwarding:
374
417
  Enabled: false
375
418
 
419
+ Style/ArrayIntersect:
420
+ Enabled: true
421
+
376
422
  Style/BisectedAttrAccessor:
377
423
  Enabled: false
378
424
 
379
425
  Style/CaseEquality:
380
426
  AllowOnConstant: true
427
+ AllowOnSelfClass: true
381
428
 
382
429
  Style/CaseLikeIf:
383
430
  Enabled: false
@@ -385,6 +432,10 @@ Style/CaseLikeIf:
385
432
  Style/ClassEqualityComparison:
386
433
  Enabled: false
387
434
 
435
+ Style/ClassMethodsDefinitions:
436
+ EnforcedStyle: self_class
437
+ Enabled: true
438
+
388
439
  Style/CollectionCompact:
389
440
  Enabled: false
390
441
 
@@ -400,6 +451,12 @@ Style/CommandLiteral:
400
451
  Style/CommentedKeyword:
401
452
  Enabled: false
402
453
 
454
+ Style/ComparableClamp:
455
+ Enabled: true
456
+
457
+ Style/ConcatArrayLiterals:
458
+ Enabled: true
459
+
403
460
  Style/DateTime:
404
461
  Enabled: true
405
462
 
@@ -421,6 +478,9 @@ Style/DoubleNegation:
421
478
  Style/EmptyBlockParameter:
422
479
  Enabled: false
423
480
 
481
+ Style/EmptyHeredoc:
482
+ Enabled: true
483
+
424
484
  Style/EmptyLambdaParameter:
425
485
  Enabled: false
426
486
 
@@ -505,18 +565,31 @@ Style/InPatternThen:
505
565
  Style/InverseMethods:
506
566
  Enabled: false
507
567
 
568
+ Style/InvertibleUnlessCondition:
569
+ Enabled: true
570
+
508
571
  Style/KeywordParametersOrder:
509
572
  Enabled: false
510
573
 
511
574
  Style/Lambda:
512
575
  Enabled: false
513
576
 
577
+ Style/MagicCommentFormat:
578
+ Enabled: true
579
+ ValueCapitalization: lowercase
580
+
581
+ Style/MapCompactWithConditionalBlock:
582
+ Enabled: false
583
+
514
584
  Style/MapToHash:
515
585
  Enabled: false
516
586
 
587
+ Style/MapToSet:
588
+ Enabled: false
589
+
517
590
  Style/MethodCallWithArgsParentheses:
518
591
  Enabled: true
519
- IgnoredMethods:
592
+ AllowedMethods:
520
593
  - require
521
594
  - require_relative
522
595
  - require_dependency
@@ -529,6 +602,9 @@ Style/MethodCallWithArgsParentheses:
529
602
  Style/MinMax:
530
603
  Enabled: false
531
604
 
605
+ Style/MinMaxComparison:
606
+ Enabled: true
607
+
532
608
  Style/MixinGrouping:
533
609
  Enabled: false
534
610
 
@@ -574,9 +650,6 @@ Style/NumberedParameters:
574
650
  Style/NumberedParametersLimit:
575
651
  Enabled: false
576
652
 
577
- Style/NumericLiteralPrefix:
578
- EnforcedOctalStyle: zero_only
579
-
580
653
  Style/NumericLiterals:
581
654
  Enabled: false
582
655
 
@@ -589,6 +662,9 @@ Style/ObjectThen:
589
662
  Style/OpenStructUse:
590
663
  Enabled: true
591
664
 
665
+ Style/OperatorMethodCall:
666
+ Enabled: true
667
+
592
668
  Style/OptionalBooleanParameter:
593
669
  Enabled: false
594
670
 
@@ -616,6 +692,15 @@ Style/RedundantCondition:
616
692
  Style/RedundantConditional:
617
693
  Enabled: false
618
694
 
695
+ Style/RedundantConstantBase:
696
+ Enabled: true
697
+
698
+ Style/RedundantDoubleSplatHashBraces:
699
+ Enabled: true
700
+
701
+ Style/RedundantEach:
702
+ Enabled: true
703
+
619
704
  Style/RedundantFetchBlock:
620
705
  Enabled: false
621
706
 
@@ -640,6 +725,9 @@ Style/RedundantSelfAssignmentBranch:
640
725
  Style/RedundantSort:
641
726
  Enabled: false
642
727
 
728
+ Style/RedundantStringEscape:
729
+ Enabled: true
730
+
643
731
  Style/RegexpLiteral:
644
732
  EnforcedStyle: mixed
645
733
 
@@ -686,7 +774,7 @@ Style/TrailingBodyOnMethodDefinition:
686
774
  Enabled: false
687
775
 
688
776
  Style/TrailingCommaInArguments:
689
- Enabled: false
777
+ EnforcedStyleForMultiline: comma
690
778
 
691
779
  Style/TrailingCommaInArrayLiteral:
692
780
  EnforcedStyleForMultiline: consistent_comma
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-shopify
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-13 00:00:00.000000000 Z
11
+ date: 2023-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.29'
19
+ version: '1.44'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.29'
26
+ version: '1.44'
27
27
  description: Gem containing the rubocop.yml config that corresponds to the implementation
28
28
  of the Shopify's style guide for Ruby.
29
29
  email: gems@shopify.com
@@ -31,13 +31,14 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
+ - LICENSE.md
34
35
  - rubocop-cli.yml
35
36
  - rubocop.yml
36
37
  homepage: https://shopify.github.io/ruby-style-guide/
37
38
  licenses:
38
39
  - MIT
39
40
  metadata:
40
- source_code_uri: https://github.com/Shopify/ruby-style-guide/tree/v2.6.0
41
+ source_code_uri: https://github.com/Shopify/ruby-style-guide/tree/v2.12.0
41
42
  allowed_push_host: https://rubygems.org
42
43
  post_install_message:
43
44
  rdoc_options: []
@@ -54,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
55
  - !ruby/object:Gem::Version
55
56
  version: '0'
56
57
  requirements: []
57
- rubygems_version: 3.2.20
58
+ rubygems_version: 3.3.3
58
59
  signing_key:
59
60
  specification_version: 4
60
61
  summary: Shopify's style guide for Ruby.