rubocop-shopify 2.12.0 → 2.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/rubocop.yml +36 -7
  3. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 942dce94db368b872f9ea964f76636215e71629cbaf4de313464fca664ad4a29
4
- data.tar.gz: d9de136a56fd72cff7892a14bab9c186c9432582d0ef9efd5bb028db628e1dfe
3
+ metadata.gz: 63613b7088f4aa93372f9e4feb012d749fb092865ab1a556aff4587e2fb77c3f
4
+ data.tar.gz: b6d3e195b06729ef3d2ef2d5107b8e3a534ce4bc11e521e34dfcc3f44727012a
5
5
  SHA512:
6
- metadata.gz: 5203fa9ff71fd237d3704146d16baee5bafd448519729ab30c0d660b9705edec24cd22564a53617bf1b898f0aa53648306899451ee32460a53344bdfec2300ae
7
- data.tar.gz: 781744afcd2e317a9368a73e948ef663668bad5c9e943b4ef7c7f2893dc0b44fad95b46cef48a88d2d524ee5013040ea39f652662e1ed691f5665856ab765c31
6
+ metadata.gz: f0b453ba7067cc1d0e957b6827aa206b26f01178627866abbb1cb25be532f0e1ef98a75838a26f377337a1c635b28d79fb494e79e69b11d8f2afcfae4112275e
7
+ data.tar.gz: fe7eaf1cc8b434d634f480404f73b757fbf3ccf0f48103bae281508f7e554b2a44c8bf6f9a4466e0af8c627c306d92a4b67ebed78efa1482bc54e28795aa13d5
data/rubocop.yml CHANGED
@@ -64,9 +64,9 @@ Layout/LineEndStringConcatenationIndentation:
64
64
  EnforcedStyle: indented
65
65
 
66
66
  Layout/LineLength:
67
- IgnoreCopDirectives: false
68
67
  AllowedPatterns:
69
68
  - "\\A\\s*(remote_)?test(_\\w+)?\\s.*(do|->)(\\s|\\Z)"
69
+ - "\\A\\s*def test_\\w+\\s*\\Z"
70
70
 
71
71
  Layout/MultilineArrayLineBreaks:
72
72
  Enabled: true
@@ -131,6 +131,9 @@ Lint/DuplicateElsifCondition:
131
131
  Lint/DuplicateMagicComment:
132
132
  Enabled: true
133
133
 
134
+ Lint/DuplicateMatchPattern:
135
+ Enabled: true
136
+
134
137
  Lint/DuplicateRegexpCharacterClassElement:
135
138
  Enabled: false
136
139
 
@@ -192,7 +195,7 @@ Lint/NestedPercentLiteral:
192
195
  Enabled: false
193
196
 
194
197
  Lint/NoReturnInBeginEndBlocks:
195
- Enabled: false
198
+ Enabled: true
196
199
 
197
200
  Lint/NonAtomicFileOperation:
198
201
  Enabled: false
@@ -326,6 +329,9 @@ Metrics/BlockLength:
326
329
  Metrics/ClassLength:
327
330
  Enabled: false
328
331
 
332
+ Metrics/CollectionLiteralLength:
333
+ Enabled: true
334
+
329
335
  Metrics/CyclomaticComplexity:
330
336
  Enabled: false
331
337
 
@@ -366,14 +372,19 @@ Naming/InclusiveLanguage:
366
372
  - leader
367
373
  AllowedRegex:
368
374
  - !ruby/regexp '/master[_\s\.]key/' # Rails master key
369
- - 'blob/master/'
370
- - 'origin/master'
375
+ - !ruby/regexp /\w*:\/\/\S+/ # URLs (e.g. https://github.com/org/repo/blob/master/README.md)
376
+ - !ruby/regexp '/(?:blob|tree)/master/' # e.g. github.com/org/repo/blob/master/README.md, without https://
377
+ - !ruby/regexp '/origin[ \/]master/' # Legacy default git branch name
371
378
  - 'mastercard'
372
379
  - 'webmaster'
373
380
 
374
381
  Naming/MemoizedInstanceVariableName:
375
382
  Enabled: false
376
383
 
384
+ Naming/MethodName:
385
+ AllowedPatterns:
386
+ - '\Atest_'
387
+
377
388
  Naming/MethodParameterName:
378
389
  Enabled: false
379
390
 
@@ -410,9 +421,6 @@ Style/AccessorGrouping:
410
421
  Style/Alias:
411
422
  EnforcedStyle: prefer_alias_method
412
423
 
413
- Style/AndOr:
414
- EnforcedStyle: always
415
-
416
424
  Style/ArgumentsForwarding:
417
425
  Enabled: false
418
426
 
@@ -457,12 +465,18 @@ Style/ComparableClamp:
457
465
  Style/ConcatArrayLiterals:
458
466
  Enabled: true
459
467
 
468
+ Style/DataInheritance:
469
+ Enabled: true
470
+
460
471
  Style/DateTime:
461
472
  Enabled: true
462
473
 
463
474
  Style/Dir:
464
475
  Enabled: false
465
476
 
477
+ Style/DirEmpty:
478
+ Enabled: true
479
+
466
480
  Style/DocumentDynamicEvalDefinition:
467
481
  Enabled: false
468
482
 
@@ -499,6 +513,9 @@ Style/EnvHome:
499
513
  Style/EvalWithLocation:
500
514
  Enabled: false
501
515
 
516
+ Style/ExactRegexpMatch:
517
+ Enabled: true
518
+
502
519
  Style/ExpandPathArguments:
503
520
  Enabled: false
504
521
 
@@ -508,6 +525,9 @@ Style/ExponentialNotation:
508
525
  Style/FetchEnvVar:
509
526
  Enabled: false
510
527
 
528
+ Style/FileEmpty:
529
+ Enabled: true
530
+
511
531
  Style/FileRead:
512
532
  Enabled: false
513
533
 
@@ -707,9 +727,15 @@ Style/RedundantFetchBlock:
707
727
  Style/RedundantFileExtensionInRequire:
708
728
  Enabled: false
709
729
 
730
+ Style/RedundantHeredocDelimiterQuotes:
731
+ Enabled: true
732
+
710
733
  Style/RedundantInitialize:
711
734
  Enabled: false
712
735
 
736
+ Style/RedundantLineContinuation:
737
+ Enabled: true
738
+
713
739
  Style/RedundantRegexpCharacterClass:
714
740
  Enabled: false
715
741
 
@@ -734,6 +760,9 @@ Style/RegexpLiteral:
734
760
  Style/RescueStandardError:
735
761
  Enabled: false
736
762
 
763
+ Style/ReturnNil:
764
+ Enabled: true
765
+
737
766
  Style/SelectByRegexp:
738
767
  Enabled: false
739
768
 
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.12.0
4
+ version: 2.14.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: 2023-01-30 00:00:00.000000000 Z
11
+ date: 2023-06-09 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.44'
19
+ version: '1.51'
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.44'
26
+ version: '1.51'
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
@@ -38,7 +38,7 @@ homepage: https://shopify.github.io/ruby-style-guide/
38
38
  licenses:
39
39
  - MIT
40
40
  metadata:
41
- source_code_uri: https://github.com/Shopify/ruby-style-guide/tree/v2.12.0
41
+ source_code_uri: https://github.com/Shopify/ruby-style-guide/tree/v2.14.0
42
42
  allowed_push_host: https://rubygems.org
43
43
  post_install_message:
44
44
  rdoc_options: []
@@ -55,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
55
  - !ruby/object:Gem::Version
56
56
  version: '0'
57
57
  requirements: []
58
- rubygems_version: 3.3.3
58
+ rubygems_version: 3.4.13
59
59
  signing_key:
60
60
  specification_version: 4
61
61
  summary: Shopify's style guide for Ruby.