rubocop-shopify 2.14.0 → 2.15.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 +78 -6
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63613b7088f4aa93372f9e4feb012d749fb092865ab1a556aff4587e2fb77c3f
4
- data.tar.gz: b6d3e195b06729ef3d2ef2d5107b8e3a534ce4bc11e521e34dfcc3f44727012a
3
+ metadata.gz: 4f9fe766156a714fd2dde1c34150b1f139a4571777747736958b47f2c3f8f582
4
+ data.tar.gz: bf715a9ce2769e3e6ef195b35e7937fbf717dea033a0b8b0067bc734ffe93a24
5
5
  SHA512:
6
- metadata.gz: f0b453ba7067cc1d0e957b6827aa206b26f01178627866abbb1cb25be532f0e1ef98a75838a26f377337a1c635b28d79fb494e79e69b11d8f2afcfae4112275e
7
- data.tar.gz: fe7eaf1cc8b434d634f480404f73b757fbf3ccf0f48103bae281508f7e554b2a44c8bf6f9a4466e0af8c627c306d92a4b67ebed78efa1482bc54e28795aa13d5
6
+ metadata.gz: 1da5f24b3a3c38959172e8293a28dec7bebadbef43b26caf9b9873bf35f4aedbf98577151231050d1636f23251523881e77efebe787f019db35abe06837db6f5
7
+ data.tar.gz: a8e8734d507b457526323530c8f5dd654893ea77a0f78101004f1b9f93f9f5d9e506106f527bf4c636506645ead244111e1585cac63e5826bd16a5aac2c1ad16
data/rubocop.yml CHANGED
@@ -1,3 +1,9 @@
1
+ <%
2
+ require "rubocop/shopify/gem_version_string_comparable_backport"
3
+
4
+ rubocop_version = Gem.loaded_specs.fetch("rubocop").version
5
+ %>
6
+
1
7
  inherit_mode:
2
8
  merge:
3
9
  - Exclude
@@ -5,6 +11,7 @@ inherit_mode:
5
11
 
6
12
  AllCops:
7
13
  StyleGuideBaseURL: https://shopify.github.io/ruby-style-guide/
14
+ NewCops: disable # New cops will be triaged by style guide maintainers instead.
8
15
 
9
16
  Bundler/OrderedGems:
10
17
  Enabled: false
@@ -54,10 +61,10 @@ Layout/HashAlignment:
54
61
  EnforcedLastArgumentHashStyle: ignore_implicit
55
62
 
56
63
  Layout/LineContinuationLeadingSpace:
57
- Enabled: false
64
+ Enabled: true
58
65
 
59
66
  Layout/LineContinuationSpacing:
60
- Enabled: false
67
+ Enabled: true
61
68
 
62
69
  Layout/LineEndStringConcatenationIndentation:
63
70
  Enabled: true
@@ -182,9 +189,24 @@ Lint/IncompatibleIoSelectWithFiberScheduler:
182
189
  Lint/InterpolationCheck:
183
190
  Enabled: false
184
191
 
192
+ <% if rubocop_version >= "1.59" %>
193
+ Lint/ItWithoutArgumentsInBlock:
194
+ Enabled: true
195
+ <% end %>
196
+
185
197
  Lint/LambdaWithoutLiteralBlock:
186
198
  Enabled: false
187
199
 
200
+ <% if rubocop_version >= "1.58" %>
201
+ Lint/LiteralAssignmentInCondition:
202
+ Enabled: true
203
+ <% end %>
204
+
205
+ <% if rubocop_version >= "1.53" %>
206
+ Lint/MixedCaseRange:
207
+ Enabled: true
208
+ <% end %>
209
+
188
210
  Lint/MixedRegexpCaptureTypes:
189
211
  Enabled: false
190
212
 
@@ -218,6 +240,11 @@ Lint/RaiseException:
218
240
  Lint/RedundantDirGlobSort:
219
241
  Enabled: false
220
242
 
243
+ <% if rubocop_version >= "1.53" %>
244
+ Lint/RedundantRegexpQuantifiers:
245
+ Enabled: true
246
+ <% end %>
247
+
221
248
  Lint/RedundantRequireStatement:
222
249
  Enabled: false
223
250
 
@@ -375,8 +402,7 @@ Naming/InclusiveLanguage:
375
402
  - !ruby/regexp /\w*:\/\/\S+/ # URLs (e.g. https://github.com/org/repo/blob/master/README.md)
376
403
  - !ruby/regexp '/(?:blob|tree)/master/' # e.g. github.com/org/repo/blob/master/README.md, without https://
377
404
  - !ruby/regexp '/origin[ \/]master/' # Legacy default git branch name
378
- - 'mastercard'
379
- - 'webmaster'
405
+ - !ruby/regexp '/(?<=[a-z])master|master(?=[a-z])/' # "master" substring within a longer word
380
406
 
381
407
  Naming/MemoizedInstanceVariableName:
382
408
  Enabled: false
@@ -505,7 +531,7 @@ Style/Encoding:
505
531
  Enabled: false
506
532
 
507
533
  Style/EndlessMethod:
508
- Enabled: false
534
+ Enabled: true
509
535
 
510
536
  Style/EnvHome:
511
537
  Enabled: false
@@ -542,6 +568,7 @@ Style/FormatStringToken:
542
568
 
543
569
  Style/FrozenStringLiteralComment:
544
570
  SafeAutoCorrect: true
571
+ EnforcedStyle: always_true
545
572
  Details: 'Add `# frozen_string_literal: true` to the top of the file. Frozen string
546
573
  literals will become the default in a future Ruby version, and we want to make
547
574
  sure we''re ready.'
@@ -577,7 +604,7 @@ Style/IfUnlessModifier:
577
604
  Enabled: false
578
605
 
579
606
  Style/IfWithBooleanLiteralBranches:
580
- Enabled: false
607
+ Enabled: true
581
608
 
582
609
  Style/InPatternThen:
583
610
  Enabled: true
@@ -703,6 +730,11 @@ Style/RandomWithOffset:
703
730
  Style/RedundantArgument:
704
731
  Enabled: false
705
732
 
733
+ <% if rubocop_version >= "1.52" %>
734
+ Style/RedundantArrayConstructor:
735
+ Enabled: true
736
+ <% end %>
737
+
706
738
  Style/RedundantAssignment:
707
739
  Enabled: false
708
740
 
@@ -715,6 +747,11 @@ Style/RedundantConditional:
715
747
  Style/RedundantConstantBase:
716
748
  Enabled: true
717
749
 
750
+ <% if rubocop_version >= "1.53" %>
751
+ Style/RedundantCurrentDirectoryInPath:
752
+ Enabled: true
753
+ <% end %>
754
+
718
755
  Style/RedundantDoubleSplatHashBraces:
719
756
  Enabled: true
720
757
 
@@ -727,6 +764,11 @@ Style/RedundantFetchBlock:
727
764
  Style/RedundantFileExtensionInRequire:
728
765
  Enabled: false
729
766
 
767
+ <% if rubocop_version >= "1.52" %>
768
+ Style/RedundantFilterChain:
769
+ Enabled: true
770
+ <% end %>
771
+
730
772
  Style/RedundantHeredocDelimiterQuotes:
731
773
  Enabled: true
732
774
 
@@ -736,9 +778,19 @@ Style/RedundantInitialize:
736
778
  Style/RedundantLineContinuation:
737
779
  Enabled: true
738
780
 
781
+ <% if rubocop_version >= "1.53" %>
782
+ Style/RedundantRegexpArgument:
783
+ Enabled: true
784
+ <% end %>
785
+
739
786
  Style/RedundantRegexpCharacterClass:
740
787
  Enabled: false
741
788
 
789
+ <% if rubocop_version >= "1.52" %>
790
+ Style/RedundantRegexpConstructor:
791
+ Enabled: true
792
+ <% end %>
793
+
742
794
  Style/RedundantRegexpEscape:
743
795
  Enabled: false
744
796
 
@@ -763,12 +815,22 @@ Style/RescueStandardError:
763
815
  Style/ReturnNil:
764
816
  Enabled: true
765
817
 
818
+ <% if rubocop_version >= "1.53" %>
819
+ Style/ReturnNilInPredicateMethodDefinition:
820
+ Enabled: true
821
+ <% end %>
822
+
766
823
  Style/SelectByRegexp:
767
824
  Enabled: false
768
825
 
769
826
  Style/SingleArgumentDig:
770
827
  Enabled: false
771
828
 
829
+ <% if rubocop_version >= "1.57" %>
830
+ Style/SingleLineDoEndBlock:
831
+ Enabled: true
832
+ <% end %>
833
+
772
834
  Style/SlicingWithRange:
773
835
  Enabled: false
774
836
 
@@ -793,6 +855,11 @@ Style/StringLiteralsInInterpolation:
793
855
  Style/StructInheritance:
794
856
  Enabled: false
795
857
 
858
+ <% if rubocop_version >= "1.58" %>
859
+ Style/SuperWithArgsParentheses:
860
+ Enabled: true
861
+ <% end %>
862
+
796
863
  Style/SwapValues:
797
864
  Enabled: false
798
865
 
@@ -823,5 +890,10 @@ Style/UnpackFirst:
823
890
  Style/WordArray:
824
891
  EnforcedStyle: brackets
825
892
 
893
+ <% if rubocop_version >= "1.53" %>
894
+ Style/YAMLFileRead:
895
+ Enabled: true
896
+ <% end %>
897
+
826
898
  Style/YodaCondition:
827
899
  Enabled: false
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.14.0
4
+ version: 2.15.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-06-09 00:00:00.000000000 Z
11
+ date: 2024-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -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.14.0
41
+ source_code_uri: https://github.com/Shopify/ruby-style-guide/tree/v2.15.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.4.13
58
+ rubygems_version: 3.5.6
59
59
  signing_key:
60
60
  specification_version: 4
61
61
  summary: Shopify's style guide for Ruby.