standard 1.9.1 → 1.16.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d16d09b664369b92dbeb6b7a9646462785cee9116203f7f83c8340a1d1656bcd
4
- data.tar.gz: 4a41de9620b60254069aba96e330931ce2a5420ab1107644aad8bce3e9aa2fe9
3
+ metadata.gz: 0eccc642c9ef6ba599bd6810a987a2f42b048fd9be747f74569bdc268bca67c9
4
+ data.tar.gz: eb6df2a69cc05c6efd94cecdff7bfe7caedb03a48725db8e9fe17ce8c54c862c
5
5
  SHA512:
6
- metadata.gz: f28501c9acae202d730cc8316f317bc00bb916f86ed3629cdd5eec5b5fbb7c4e12df3a33088de64fb1802f1cadeb44237f05403243c05de10f2c5ac5386aa5c1
7
- data.tar.gz: 98d434544b5fe696c3b596767210c0fbff150f6e23184099fe9b62a7e3977db09a580cf6d2f0ce286e52131214c880e0058d2d16161bd4d726a64e0b032c8525
6
+ metadata.gz: 293b881fbe10c38247b1cc5e59736cb71e27d94bcdf7479ed5863dca5614943f99511518183f0e06c8ae2883086f5b573f1c9e75bc82a9ea4a0c1aa46dcb3142
7
+ data.tar.gz: 40351aa4be24ae0aa07d650d511577d349df8b1e4abf7a0a87973606a26e0cd26d149401a247ea35480c6a4f30d2ced5580e73d1c7b408241386943607a19a31
@@ -30,7 +30,7 @@ jobs:
30
30
  run: |
31
31
  eval "$(bundle outdated rubocop rubocop-performance |
32
32
  grep rubocop |
33
- awk '{print "sed -i \"2i* Update "$1" from "$2" to ["$3"](https://github.com/rubocop/"$1"/tag/v"$3")\" CHANGELOG.md"}' - )";
33
+ awk '{print "sed -i \"2i* Update "$1" from "$2" to ["$3"](https://github.com/rubocop/"$1"/releases/tag/v"$3")\" CHANGELOG.md"}' - )";
34
34
  sed -i '2i\\n## Unreleased\n' CHANGELOG.md;
35
35
  - name: Update Gemspec
36
36
  run: |
data/CHANGELOG.md CHANGED
@@ -1,8 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.16.1
4
+
5
+ * Update rubocop from 1.35.0 to [1.35.1](https://github.com/rubocop/rubocop/releases/tag/v1.35.1)
6
+
7
+ ## 1.16.0
8
+
9
+ * Update rubocop from 1.33.0 to [1.35.0](https://github.com/rubocop/rubocop/releases/tag/v1.35.0)
10
+
11
+ ## 1.15.0
12
+
13
+ * Update rubocop from 1.32.0 to [1.33.0](https://github.com/rubocop/rubocop/releases/tag/v1.33.0)
14
+
15
+ ## 1.14.0
16
+
17
+ * Update rubocop from 1.31.2 to [1.32.0](https://github.com/rubocop/rubocop/releases/tag/v1.32.0)
18
+
19
+ ## 1.13.0
20
+
21
+ * Update rubocop-performance from 1.13.3 to [1.14.3](https://github.com/rubocop/rubocop-performance/releases/tag/v1.14.3)
22
+ * Update rubocop from 1.29.1 to [1.31.2](https://github.com/rubocop/rubocop/releases/tag/v1.31.2)
23
+
24
+ ## 1.12.1
25
+
26
+ * Update rubocop from 1.29.0 to [1.29.1](https://github.com/rubocop/rubocop/releases/tag/v1.29.1), fixing [#413](https://github.com/testdouble/standard/issues/413)
27
+
28
+ ## 1.12.0
29
+
30
+ * Update rubocop from 1.28.2 to [1.29.0](https://github.com/rubocop/rubocop/releases/tag/v1.29.0)
31
+
32
+ ## 1.11.0
33
+
34
+ * Update rubocop from 1.27.0 to [1.28.2](https://github.com/rubocop/rubocop/releases/tag/v1.28.2)
35
+
36
+ ## 1.10.0
37
+
38
+ * Update rubocop from 1.26.1 to [1.27.0](https://github.com/rubocop/rubocop/releases/tag/v1.27.0)
39
+
3
40
  ## 1.9.1
4
41
 
5
- * Update rubocop from 1.26.0 to [1.26.1](https://github.com/rubocop/rubocop/tag/v1.26.1)
42
+ * Update rubocop from 1.26.0 to [1.26.1](https://github.com/rubocop/rubocop/releases/tag/v1.26.1)
6
43
 
7
44
  ## 1.9.0
8
45
 
@@ -10,7 +47,7 @@
10
47
 
11
48
  ## 1.8.0
12
49
 
13
- * Update rubocop from 1.25.1 to [1.26.0](https://github.com/rubocop/rubocop/tag/v1.26.0)
50
+ * Update rubocop from 1.25.1 to [1.26.0](https://github.com/rubocop/rubocop/releases/tag/v1.26.0)
14
51
 
15
52
  ## 1.7.3
16
53
 
@@ -22,22 +59,22 @@
22
59
 
23
60
  ## 1.7.1
24
61
 
25
- * Update rubocop from 1.25.0 to [1.25.1](https://github.com/rubocop/rubocop/tag/v1.25.1)
62
+ * Update rubocop from 1.25.0 to [1.25.1](https://github.com/rubocop/rubocop/releases/tag/v1.25.1)
26
63
 
27
64
  ## 1.7.0
28
65
 
29
66
  * Update rubocop-performance from 1.13.1 to [1.13.2](https://github.com/rubocop/rubocop-performance/tag/v1.13.2)
30
- * Update rubocop from 1.24.1 to [1.25.0](https://github.com/rubocop/rubocop/tag/v1.25.0)
67
+ * Update rubocop from 1.24.1 to [1.25.0](https://github.com/rubocop/rubocop/releases/tag/v1.25.0)
31
68
 
32
69
  ## 1.6.0
33
70
 
34
71
  * Update rubocop-performance from 1.12.0 to [1.13.1](https://github.com/rubocop/rubocop-performance/tag/v1.13.1)
35
- * Update rubocop from 1.23.0 to [1.24.1](https://github.com/rubocop/rubocop/tag/v1.24.1)
72
+ * Update rubocop from 1.23.0 to [1.24.1](https://github.com/rubocop/rubocop/releases/tag/v1.24.1)
36
73
 
37
74
  ## 1.5.0
38
75
 
39
76
  * Update rubocop-performance from 1.11.5 to [1.12.0](https://github.com/rubocop/rubocop-performance/tag/v1.12.0)
40
- * Update rubocop from 1.22.3 to [1.23.0](https://github.com/rubocop/rubocop/tag/v1.23.0)
77
+ * Update rubocop from 1.22.3 to [1.23.0](https://github.com/rubocop/rubocop/releases/tag/v1.23.0)
41
78
 
42
79
  ## 1.4.0
43
80
 
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard (1.9.1)
5
- rubocop (= 1.26.1)
6
- rubocop-performance (= 1.13.3)
4
+ standard (1.16.1)
5
+ rubocop (= 1.35.1)
6
+ rubocop-performance (= 1.14.3)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -12,30 +12,32 @@ GEM
12
12
  coderay (1.1.3)
13
13
  docile (1.4.0)
14
14
  gimme (0.5.0)
15
+ json (2.6.2)
15
16
  method_source (1.0.0)
16
- minitest (5.15.0)
17
+ minitest (5.16.3)
17
18
  parallel (1.22.1)
18
- parser (3.1.1.0)
19
+ parser (3.1.2.1)
19
20
  ast (~> 2.4.1)
20
21
  pry (0.14.1)
21
22
  coderay (~> 1.1)
22
23
  method_source (~> 1.0)
23
24
  rainbow (3.1.1)
24
25
  rake (13.0.6)
25
- regexp_parser (2.2.1)
26
+ regexp_parser (2.5.0)
26
27
  rexml (3.2.5)
27
- rubocop (1.26.1)
28
+ rubocop (1.35.1)
29
+ json (~> 2.3)
28
30
  parallel (~> 1.10)
29
- parser (>= 3.1.0.0)
31
+ parser (>= 3.1.2.1)
30
32
  rainbow (>= 2.2.2, < 4.0)
31
33
  regexp_parser (>= 1.8, < 3.0)
32
- rexml
33
- rubocop-ast (>= 1.16.0, < 2.0)
34
+ rexml (>= 3.2.5, < 4.0)
35
+ rubocop-ast (>= 1.20.1, < 2.0)
34
36
  ruby-progressbar (~> 1.7)
35
37
  unicode-display_width (>= 1.4.0, < 3.0)
36
- rubocop-ast (1.16.0)
38
+ rubocop-ast (1.21.0)
37
39
  parser (>= 3.1.1.0)
38
- rubocop-performance (1.13.3)
40
+ rubocop-performance (1.14.3)
39
41
  rubocop (>= 1.7.0, < 2.0)
40
42
  rubocop-ast (>= 0.4.0)
41
43
  ruby-progressbar (1.11.0)
@@ -45,7 +47,7 @@ GEM
45
47
  simplecov_json_formatter (~> 0.1)
46
48
  simplecov-html (0.12.3)
47
49
  simplecov_json_formatter (0.1.4)
48
- unicode-display_width (2.1.0)
50
+ unicode-display_width (2.2.0)
49
51
 
50
52
  PLATFORMS
51
53
  ruby
data/README.md CHANGED
@@ -182,7 +182,7 @@ The beauty of Ruby Standard Style is that it's simple. No one wants to
182
182
  maintain multiple hundred-line style configuration files for every module/project
183
183
  they work on. Enough of this madness!
184
184
 
185
- This gem saves you (and others!) time in three ways:
185
+ This gem saves you (and others!) time in four ways:
186
186
 
187
187
  - **No configuration.** The easiest way to enforce consistent style in your
188
188
  project. Just drop it in.
@@ -190,6 +190,9 @@ This gem saves you (and others!) time in three ways:
190
190
  messy or inconsistent code.
191
191
  - **Catch style issues & programmer errors early.** Save precious code review
192
192
  time by eliminating back-and-forth between reviewer & contributor.
193
+ - **Deliberate pace.** We strive to take the hassle of upgrading Rubocop out of each
194
+ individual team's hands and shoulder it ourselves. We enable about ~20% of new
195
+ cops and generally choose conservative configurations for them.
193
196
 
194
197
  Adopting Standard style means ranking the importance of code clarity and
195
198
  community conventions higher than personal style. This might not make sense for
@@ -223,6 +226,7 @@ if you've used StandardJS.)
223
226
  * [Brave Software](https://github.com/brave-intl/publishers)
224
227
  * [Collective Idea](https://collectiveidea.com/)
225
228
  * [Culture Foundry](https://www.culturefoundry.com/)
229
+ * [Elevate Labs](https://elevatelabs.com)
226
230
  * [Envoy](https://www.envoy.com)
227
231
  * [Evil Martians](https://evilmartians.com)
228
232
  * [Hashrocket](https://hashrocket.com)
data/config/base.yml CHANGED
@@ -32,7 +32,10 @@ Bundler/InsecureProtocolSource:
32
32
  Bundler/OrderedGems:
33
33
  Enabled: false
34
34
 
35
- Gemspec/DateAssignment:
35
+ Gemspec/DependencyVersion:
36
+ Enabled: false
37
+
38
+ Gemspec/DeprecatedAttributeAssignment:
36
39
  Enabled: true
37
40
 
38
41
  Gemspec/DuplicatedAssignment:
@@ -43,13 +46,13 @@ Gemspec/DuplicatedAssignment:
43
46
  Gemspec/OrderedDependencies:
44
47
  Enabled: false
45
48
 
46
- Gemspec/RequiredRubyVersion:
49
+ Gemspec/RequireMFA:
47
50
  Enabled: false
48
51
 
49
- Gemspec/RubyVersionGlobalsUsage:
52
+ Gemspec/RequiredRubyVersion:
50
53
  Enabled: false
51
54
 
52
- Gemspec/RequireMFA:
55
+ Gemspec/RubyVersionGlobalsUsage:
53
56
  Enabled: false
54
57
 
55
58
  Layout/AccessModifierIndentation:
@@ -235,7 +238,7 @@ Layout/IndentationStyle:
235
238
  Layout/IndentationWidth:
236
239
  Enabled: true
237
240
  Width: 2
238
- IgnoredPatterns: []
241
+ AllowedPatterns: []
239
242
 
240
243
  Layout/InitialIndentation:
241
244
  Enabled: true
@@ -246,6 +249,12 @@ Layout/LeadingCommentSpace:
246
249
  Layout/LeadingEmptyLines:
247
250
  Enabled: true
248
251
 
252
+ Layout/LineContinuationLeadingSpace:
253
+ Enabled: false
254
+
255
+ Layout/LineContinuationSpacing:
256
+ Enabled: true
257
+
249
258
  Layout/LineEndStringConcatenationIndentation:
250
259
  Enabled: false
251
260
 
@@ -288,6 +297,9 @@ Layout/MultilineMethodDefinitionBraceLayout:
288
297
  Enabled: true
289
298
  EnforcedStyle: symmetrical
290
299
 
300
+ Layout/MultilineMethodParameterLineBreaks:
301
+ Enabled: false
302
+
291
303
  Layout/MultilineOperationIndentation:
292
304
  Enabled: true
293
305
  EnforcedStyle: indented
@@ -448,6 +460,9 @@ Lint/CircularArgumentReference:
448
460
  Lint/ConstantDefinitionInBlock:
449
461
  Enabled: true
450
462
 
463
+ Lint/ConstantOverwrittenInRescue:
464
+ Enabled: true
465
+
451
466
  Lint/ConstantResolution:
452
467
  Enabled: false
453
468
 
@@ -555,6 +570,9 @@ Lint/IdentityComparison:
555
570
  Lint/ImplicitStringConcatenation:
556
571
  Enabled: true
557
572
 
573
+ Lint/IncompatibleIoSelectWithFiberScheduler:
574
+ Enabled: false
575
+
558
576
  Lint/IneffectiveAccessModifier:
559
577
  Enabled: true
560
578
 
@@ -602,6 +620,9 @@ Lint/NextWithoutAccumulator:
602
620
  Lint/NoReturnInBeginEndBlocks:
603
621
  Enabled: false
604
622
 
623
+ Lint/NonAtomicFileOperation:
624
+ Enabled: false
625
+
605
626
  Lint/NonDeterministicRequireOrder:
606
627
  Enabled: true
607
628
 
@@ -665,12 +686,22 @@ Lint/RedundantWithIndex:
665
686
  Lint/RedundantWithObject:
666
687
  Enabled: true
667
688
 
689
+ Lint/RefinementImportMethods:
690
+ Enabled: true
691
+ SafeAutoCorrect: false
692
+
668
693
  Lint/RegexpAsCondition:
669
694
  Enabled: true
670
695
 
671
696
  Lint/RequireParentheses:
672
697
  Enabled: true
673
698
 
699
+ Lint/RequireRangeParentheses:
700
+ Enabled: true
701
+
702
+ Lint/RequireRelativeSelfPath:
703
+ Enabled: true
704
+
674
705
  Lint/RescueException:
675
706
  Enabled: true
676
707
 
@@ -784,11 +815,14 @@ Lint/UselessAssignment:
784
815
  Enabled: true
785
816
 
786
817
  Lint/UselessElseWithoutRescue:
787
- Enabled: true
818
+ Enabled: false
788
819
 
789
820
  Lint/UselessMethodDefinition:
790
821
  Enabled: false
791
822
 
823
+ Lint/UselessRuby2Keywords:
824
+ Enabled: true
825
+
792
826
  Lint/UselessSetterCall:
793
827
  Enabled: true
794
828
 
@@ -799,15 +833,6 @@ Lint/Void:
799
833
  Enabled: true
800
834
  CheckForMethodsWithNoSideEffects: false
801
835
 
802
- Lint/IncompatibleIoSelectWithFiberScheduler:
803
- Enabled: true
804
-
805
- Lint/RequireRelativeSelfPath:
806
- Enabled: true
807
-
808
- Lint/UselessRuby2Keywords:
809
- Enabled: true
810
-
811
836
  Metrics/AbcSize:
812
837
  Enabled: false
813
838
 
@@ -847,6 +872,9 @@ Naming/AsciiIdentifiers:
847
872
  Naming/BinaryOperatorParameterName:
848
873
  Enabled: true
849
874
 
875
+ Naming/BlockForwarding:
876
+ Enabled: false
877
+
850
878
  Naming/BlockParameterName:
851
879
  Enabled: true
852
880
  MinNameLength: 1
@@ -895,9 +923,6 @@ Naming/VariableName:
895
923
  Naming/VariableNumber:
896
924
  Enabled: false
897
925
 
898
- Naming/BlockForwarding:
899
- Enabled: false
900
-
901
926
  Performance/AncestorsInclude:
902
927
  Enabled: false
903
928
 
@@ -931,6 +956,9 @@ Performance/CollectionLiteralInLoop:
931
956
  Performance/CompareWithBlock:
932
957
  Enabled: true
933
958
 
959
+ Performance/ConcurrentMonotonicTime:
960
+ Enabled: true
961
+
934
962
  Performance/ConstantRegexp:
935
963
  Enabled: true
936
964
 
@@ -1026,6 +1054,9 @@ Performance/Squeeze:
1026
1054
  Performance/StartWith:
1027
1055
  Enabled: true
1028
1056
 
1057
+ Performance/StringIdentifierArgument:
1058
+ Enabled: true
1059
+
1029
1060
  Performance/StringInclude:
1030
1061
  Enabled: false
1031
1062
 
@@ -1044,15 +1075,16 @@ Performance/UnfreezeString:
1044
1075
  Performance/UriDefaultParser:
1045
1076
  Enabled: true
1046
1077
 
1047
- Performance/ConcurrentMonotonicTime:
1048
- Enabled: true
1049
-
1050
- Performance/StringIdentifierArgument:
1078
+ Security/CompoundHash:
1051
1079
  Enabled: true
1052
1080
 
1053
1081
  Security/Eval:
1054
1082
  Enabled: true
1055
1083
 
1084
+ Security/IoMethods:
1085
+ Enabled: false
1086
+ Safe: false
1087
+
1056
1088
  Security/JSONLoad:
1057
1089
  Enabled: true
1058
1090
  AutoCorrect: false
@@ -1069,10 +1101,6 @@ Security/YAMLLoad:
1069
1101
  Enabled: true
1070
1102
  SafeAutoCorrect: false
1071
1103
 
1072
- Security/IoMethods:
1073
- Enabled: false
1074
- Safe: false
1075
-
1076
1104
  Standard/BlockSingleLineBraces:
1077
1105
  Enabled: true
1078
1106
 
@@ -1233,6 +1261,9 @@ Style/EmptyElse:
1233
1261
  Enabled: true
1234
1262
  EnforcedStyle: both
1235
1263
 
1264
+ Style/EmptyHeredoc:
1265
+ Enabled: false
1266
+
1236
1267
  Style/EmptyLambdaParameter:
1237
1268
  Enabled: true
1238
1269
 
@@ -1253,6 +1284,9 @@ Style/EndBlock:
1253
1284
  Style/EndlessMethod:
1254
1285
  Enabled: false
1255
1286
 
1287
+ Style/EnvHome:
1288
+ Enabled: false
1289
+
1256
1290
  Style/EvalWithLocation:
1257
1291
  Enabled: true
1258
1292
 
@@ -1268,6 +1302,15 @@ Style/ExplicitBlockArgument:
1268
1302
  Style/ExponentialNotation:
1269
1303
  Enabled: false
1270
1304
 
1305
+ Style/FetchEnvVar:
1306
+ Enabled: false
1307
+
1308
+ Style/FileRead:
1309
+ Enabled: true
1310
+
1311
+ Style/FileWrite:
1312
+ Enabled: true
1313
+
1271
1314
  Style/FloatDivision:
1272
1315
  Enabled: false
1273
1316
 
@@ -1370,12 +1413,21 @@ Style/LineEndConcatenation:
1370
1413
  Enabled: true
1371
1414
  SafeAutoCorrect: false
1372
1415
 
1416
+ Style/MagicCommentFormat:
1417
+ Enabled: false
1418
+
1419
+ Style/MapCompactWithConditionalBlock:
1420
+ Enabled: true
1421
+
1422
+ Style/MapToHash:
1423
+ Enabled: false
1424
+
1373
1425
  Style/MethodCallWithArgsParentheses:
1374
1426
  Enabled: false
1375
1427
 
1376
1428
  Style/MethodCallWithoutArgsParentheses:
1377
1429
  Enabled: true
1378
- IgnoredMethods: []
1430
+ AllowedMethods: []
1379
1431
 
1380
1432
  Style/MethodCalledOnDoEndBlock:
1381
1433
  Enabled: false
@@ -1492,6 +1544,12 @@ Style/NonNilCheck:
1492
1544
  Style/Not:
1493
1545
  Enabled: true
1494
1546
 
1547
+ Style/NumberedParameters:
1548
+ Enabled: false
1549
+
1550
+ Style/NumberedParametersLimit:
1551
+ Enabled: false
1552
+
1495
1553
  Style/NumericLiteralPrefix:
1496
1554
  Enabled: true
1497
1555
  EnforcedOctalStyle: zero_with_o
@@ -1502,9 +1560,15 @@ Style/NumericLiterals:
1502
1560
  Style/NumericPredicate:
1503
1561
  Enabled: false
1504
1562
 
1563
+ Style/ObjectThen:
1564
+ Enabled: false
1565
+
1505
1566
  Style/OneLineConditional:
1506
1567
  Enabled: true
1507
1568
 
1569
+ Style/OpenStructUse:
1570
+ Enabled: false
1571
+
1508
1572
  Style/OptionHash:
1509
1573
  Enabled: false
1510
1574
 
@@ -1548,7 +1612,8 @@ Style/Proc:
1548
1612
  Enabled: true
1549
1613
 
1550
1614
  Style/QuotedSymbols:
1551
- Enabled: false
1615
+ Enabled: true
1616
+ EnforcedStyle: same_as_string_literals
1552
1617
 
1553
1618
  Style/RaiseArgs:
1554
1619
  Enabled: false
@@ -1586,6 +1651,9 @@ Style/RedundantFileExtensionInRequire:
1586
1651
  Style/RedundantFreeze:
1587
1652
  Enabled: true
1588
1653
 
1654
+ Style/RedundantInitialize:
1655
+ Enabled: true
1656
+
1589
1657
  Style/RedundantInterpolation:
1590
1658
  Enabled: true
1591
1659
 
@@ -1646,6 +1714,9 @@ Style/SafeNavigation:
1646
1714
  Style/Sample:
1647
1715
  Enabled: true
1648
1716
 
1717
+ Style/SelectByRegexp:
1718
+ Enabled: false
1719
+
1649
1720
  Style/SelfAssignment:
1650
1721
  Enabled: true
1651
1722
 
@@ -1770,7 +1841,7 @@ Style/TrivialAccessors:
1770
1841
  ExactNameMatch: true
1771
1842
  AllowPredicates: true
1772
1843
  AllowDSLWriters: false
1773
- IgnoreClassMethods: false
1844
+ IgnoreClassMethods: true
1774
1845
  AllowedMethods:
1775
1846
  - to_ary
1776
1847
  - to_a
@@ -1820,24 +1891,3 @@ Style/YodaCondition:
1820
1891
 
1821
1892
  Style/ZeroLengthPredicate:
1822
1893
  Enabled: false
1823
-
1824
- Style/NumberedParameters:
1825
- Enabled: false
1826
-
1827
- Style/NumberedParametersLimit:
1828
- Enabled: false
1829
-
1830
- Style/SelectByRegexp:
1831
- Enabled: false
1832
-
1833
- Style/OpenStructUse:
1834
- Enabled: false
1835
-
1836
- Style/MapToHash:
1837
- Enabled: false
1838
-
1839
- Style/FileWrite:
1840
- Enabled: true
1841
-
1842
- Style/FileRead:
1843
- Enabled: true
data/config/ruby-3.0.yml CHANGED
@@ -8,3 +8,6 @@ Naming/BlockForwarding:
8
8
 
9
9
  Style/NestedFileDirname:
10
10
  Enabled: false
11
+
12
+ Lint/RefinementImportMethods:
13
+ Enabled: false
@@ -41,7 +41,7 @@ module Standard
41
41
  end
42
42
  end
43
43
 
44
- def finished(inspected_files)
44
+ def finished(_inspected_files)
45
45
  print_todo_congratulations
46
46
  end
47
47
 
@@ -103,7 +103,7 @@ module Standard
103
103
  end
104
104
 
105
105
  def auto_correct_option_provided?
106
- options[:auto_correct] || options[:safe_auto_correct]
106
+ options[:autocorrect]
107
107
  end
108
108
 
109
109
  def should_suggest_fix?(offenses)
@@ -19,21 +19,19 @@ module Standard
19
19
  private
20
20
 
21
21
  def separate_argv(argv)
22
- argv.partition { |flag|
22
+ argv.partition do |flag|
23
23
  ["--generate-todo", "--fix", "--no-fix", "--version", "-v", "--help", "-h"].include?(flag)
24
- }
24
+ end
25
25
  end
26
26
 
27
27
  def parse_standard_argv(argv)
28
- argv.each_with_object({}) { |arg, cli_flags|
28
+ argv.each_with_object({}) do |arg, cli_flags|
29
29
  if arg == "--fix"
30
- cli_flags[:auto_correct] = true
31
- cli_flags[:safe_auto_correct] = true
30
+ cli_flags[:autocorrect] = true
32
31
  elsif arg == "--no-fix"
33
- cli_flags[:auto_correct] = false
34
- cli_flags[:safe_auto_correct] = false
32
+ cli_flags[:autocorrect] = false
35
33
  end
36
- }
34
+ end
37
35
  end
38
36
 
39
37
  def determine_command(argv)
@@ -50,8 +48,7 @@ module Standard
50
48
 
51
49
  def merge(standard_yaml, standard_cli_flags, rubocop_cli_flags)
52
50
  {
53
- auto_correct: standard_yaml[:fix],
54
- safe_auto_correct: standard_yaml[:fix],
51
+ autocorrect: standard_yaml[:fix],
55
52
  formatters: [[standard_yaml[:format] || "Standard::Formatter", nil]],
56
53
  parallel: standard_yaml[:parallel],
57
54
  todo_file: standard_yaml[:todo_file],
@@ -1,3 +1,3 @@
1
1
  module Standard
2
- VERSION = Gem::Version.new('1.9.1')
2
+ VERSION = Gem::Version.new('1.16.1')
3
3
  end
data/standard.gemspec CHANGED
@@ -19,6 +19,6 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "rubocop", "1.26.1"
23
- spec.add_dependency "rubocop-performance", "1.13.3"
22
+ spec.add_dependency "rubocop", "1.35.1"
23
+ spec.add_dependency "rubocop-performance", "1.14.3"
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-28 00:00:00.000000000 Z
11
+ date: 2022-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,29 +16,29 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.26.1
19
+ version: 1.35.1
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.26.1
26
+ version: 1.35.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-performance
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.13.3
33
+ version: 1.14.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.13.3
41
- description:
40
+ version: 1.14.3
41
+ description:
42
42
  email:
43
43
  - searls@gmail.com
44
44
  executables:
@@ -99,7 +99,7 @@ files:
99
99
  homepage: https://github.com/testdouble/standard
100
100
  licenses: []
101
101
  metadata: {}
102
- post_install_message:
102
+ post_install_message:
103
103
  rdoc_options: []
104
104
  require_paths:
105
105
  - lib
@@ -114,8 +114,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubygems_version: 3.2.32
118
- signing_key:
117
+ rubygems_version: 3.1.6
118
+ signing_key:
119
119
  specification_version: 4
120
120
  summary: Ruby Style Guide, with linter & automatic code fixer
121
121
  test_files: []