standard 1.12.1 → 1.15.0

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: 1d2f2b142c591911c9263ef205ac6c9b1db4b6f5b09b4f7adc376107c2caff76
4
- data.tar.gz: 4832357da3082761f15bf36bfb9528573359d06afd2f28591e5abf0b5702f3d2
3
+ metadata.gz: 89f8024063be335d11ff642750e48437a667a57e79c4dde8090b2dabd0fb378a
4
+ data.tar.gz: 9a49023a12ebc840f8174f5246bd6cb86aefef1a325cb856f6698162ef38955d
5
5
  SHA512:
6
- metadata.gz: fc978a164d9321430d0d90c2a66473763d0ba19c9903a58b11fcced6a40bdf0fc89eb3714a05ef8978f939ea16e13c6775c0614f7fc0e5eb63f8ef5c092037c9
7
- data.tar.gz: ec7e4dd680b36eb882870da21c23acb0c5df1d5f17a1e8d5d46cd680caa4505517eac48e2af5fe34d5bf5961353fdc03aafb08e882052ce3e78f2b7eaf8b2d4f
6
+ metadata.gz: dddcf6a76644313e90ac9f827af5ac882d59ce4996421d426f237f64600a0f187924ffbaebac714589fd1dc46c45cc62df96c3fce769161f879ef0a809a4d0c1
7
+ data.tar.gz: 16e6f725d58bd1e234d57e1139394529f52416b674e21dfe8477c0a02d31bb9c1f052fb9a03dbccf013eed1e4153ea93200c808b124c298950f0286308982f6b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.15.0
4
+
5
+ * Update rubocop from 1.32.0 to [1.33.0](https://github.com/rubocop/rubocop/releases/tag/v1.33.0)
6
+
7
+ ## 1.14.0
8
+
9
+ * Update rubocop from 1.31.2 to [1.32.0](https://github.com/rubocop/rubocop/releases/tag/v1.32.0)
10
+
11
+ ## 1.13.0
12
+
13
+ * Update rubocop-performance from 1.13.3 to [1.14.3](https://github.com/rubocop/rubocop-performance/releases/tag/v1.14.3)
14
+ * Update rubocop from 1.29.1 to [1.31.2](https://github.com/rubocop/rubocop/releases/tag/v1.31.2)
15
+
3
16
  ## 1.12.1
4
17
 
5
18
  * 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)
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard (1.12.1)
5
- rubocop (= 1.29.1)
6
- rubocop-performance (= 1.13.3)
4
+ standard (1.15.0)
5
+ rubocop (= 1.33.0)
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.2)
17
18
  parallel (1.22.1)
18
- parser (3.1.2.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.4.0)
26
+ regexp_parser (2.5.0)
26
27
  rexml (3.2.5)
27
- rubocop (1.29.1)
28
+ rubocop (1.33.0)
29
+ json (~> 2.3)
28
30
  parallel (~> 1.10)
29
31
  parser (>= 3.1.0.0)
30
32
  rainbow (>= 2.2.2, < 4.0)
31
33
  regexp_parser (>= 1.8, < 3.0)
32
34
  rexml (>= 3.2.5, < 4.0)
33
- rubocop-ast (>= 1.17.0, < 2.0)
35
+ rubocop-ast (>= 1.19.1, < 2.0)
34
36
  ruby-progressbar (~> 1.7)
35
37
  unicode-display_width (>= 1.4.0, < 3.0)
36
- rubocop-ast (1.18.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,12 +32,12 @@ Bundler/InsecureProtocolSource:
32
32
  Bundler/OrderedGems:
33
33
  Enabled: false
34
34
 
35
- Gemspec/DateAssignment:
36
- Enabled: true
37
-
38
35
  Gemspec/DependencyVersion:
39
36
  Enabled: false
40
37
 
38
+ Gemspec/DeprecatedAttributeAssignment:
39
+ Enabled: true
40
+
41
41
  Gemspec/DuplicatedAssignment:
42
42
  Enabled: true
43
43
  Include:
@@ -46,13 +46,13 @@ Gemspec/DuplicatedAssignment:
46
46
  Gemspec/OrderedDependencies:
47
47
  Enabled: false
48
48
 
49
- Gemspec/RequiredRubyVersion:
49
+ Gemspec/RequireMFA:
50
50
  Enabled: false
51
51
 
52
- Gemspec/RubyVersionGlobalsUsage:
52
+ Gemspec/RequiredRubyVersion:
53
53
  Enabled: false
54
54
 
55
- Gemspec/RequireMFA:
55
+ Gemspec/RubyVersionGlobalsUsage:
56
56
  Enabled: false
57
57
 
58
58
  Layout/AccessModifierIndentation:
@@ -249,6 +249,12 @@ Layout/LeadingCommentSpace:
249
249
  Layout/LeadingEmptyLines:
250
250
  Enabled: true
251
251
 
252
+ Layout/LineContinuationLeadingSpace:
253
+ Enabled: false
254
+
255
+ Layout/LineContinuationSpacing:
256
+ Enabled: true
257
+
252
258
  Layout/LineEndStringConcatenationIndentation:
253
259
  Enabled: false
254
260
 
@@ -291,6 +297,9 @@ Layout/MultilineMethodDefinitionBraceLayout:
291
297
  Enabled: true
292
298
  EnforcedStyle: symmetrical
293
299
 
300
+ Layout/MultilineMethodParameterLineBreaks:
301
+ Enabled: false
302
+
294
303
  Layout/MultilineOperationIndentation:
295
304
  Enabled: true
296
305
  EnforcedStyle: indented
@@ -451,6 +460,9 @@ Lint/CircularArgumentReference:
451
460
  Lint/ConstantDefinitionInBlock:
452
461
  Enabled: true
453
462
 
463
+ Lint/ConstantOverwrittenInRescue:
464
+ Enabled: true
465
+
454
466
  Lint/ConstantResolution:
455
467
  Enabled: false
456
468
 
@@ -558,6 +570,9 @@ Lint/IdentityComparison:
558
570
  Lint/ImplicitStringConcatenation:
559
571
  Enabled: true
560
572
 
573
+ Lint/IncompatibleIoSelectWithFiberScheduler:
574
+ Enabled: false
575
+
561
576
  Lint/IneffectiveAccessModifier:
562
577
  Enabled: true
563
578
 
@@ -605,6 +620,9 @@ Lint/NextWithoutAccumulator:
605
620
  Lint/NoReturnInBeginEndBlocks:
606
621
  Enabled: false
607
622
 
623
+ Lint/NonAtomicFileOperation:
624
+ Enabled: false
625
+
608
626
  Lint/NonDeterministicRequireOrder:
609
627
  Enabled: true
610
628
 
@@ -678,6 +696,12 @@ Lint/RegexpAsCondition:
678
696
  Lint/RequireParentheses:
679
697
  Enabled: true
680
698
 
699
+ Lint/RequireRangeParentheses:
700
+ Enabled: true
701
+
702
+ Lint/RequireRelativeSelfPath:
703
+ Enabled: true
704
+
681
705
  Lint/RescueException:
682
706
  Enabled: true
683
707
 
@@ -790,9 +814,15 @@ Lint/UselessAccessModifier:
790
814
  Lint/UselessAssignment:
791
815
  Enabled: true
792
816
 
817
+ Lint/UselessElseWithoutRescue:
818
+ Enabled: false
819
+
793
820
  Lint/UselessMethodDefinition:
794
821
  Enabled: false
795
822
 
823
+ Lint/UselessRuby2Keywords:
824
+ Enabled: true
825
+
796
826
  Lint/UselessSetterCall:
797
827
  Enabled: true
798
828
 
@@ -803,15 +833,6 @@ Lint/Void:
803
833
  Enabled: true
804
834
  CheckForMethodsWithNoSideEffects: false
805
835
 
806
- Lint/IncompatibleIoSelectWithFiberScheduler:
807
- Enabled: true
808
-
809
- Lint/RequireRelativeSelfPath:
810
- Enabled: true
811
-
812
- Lint/UselessRuby2Keywords:
813
- Enabled: true
814
-
815
836
  Metrics/AbcSize:
816
837
  Enabled: false
817
838
 
@@ -851,6 +872,9 @@ Naming/AsciiIdentifiers:
851
872
  Naming/BinaryOperatorParameterName:
852
873
  Enabled: true
853
874
 
875
+ Naming/BlockForwarding:
876
+ Enabled: false
877
+
854
878
  Naming/BlockParameterName:
855
879
  Enabled: true
856
880
  MinNameLength: 1
@@ -899,9 +923,6 @@ Naming/VariableName:
899
923
  Naming/VariableNumber:
900
924
  Enabled: false
901
925
 
902
- Naming/BlockForwarding:
903
- Enabled: false
904
-
905
926
  Performance/AncestorsInclude:
906
927
  Enabled: false
907
928
 
@@ -935,6 +956,9 @@ Performance/CollectionLiteralInLoop:
935
956
  Performance/CompareWithBlock:
936
957
  Enabled: true
937
958
 
959
+ Performance/ConcurrentMonotonicTime:
960
+ Enabled: true
961
+
938
962
  Performance/ConstantRegexp:
939
963
  Enabled: true
940
964
 
@@ -1030,6 +1054,9 @@ Performance/Squeeze:
1030
1054
  Performance/StartWith:
1031
1055
  Enabled: true
1032
1056
 
1057
+ Performance/StringIdentifierArgument:
1058
+ Enabled: true
1059
+
1033
1060
  Performance/StringInclude:
1034
1061
  Enabled: false
1035
1062
 
@@ -1048,17 +1075,15 @@ Performance/UnfreezeString:
1048
1075
  Performance/UriDefaultParser:
1049
1076
  Enabled: true
1050
1077
 
1051
- Performance/ConcurrentMonotonicTime:
1052
- Enabled: true
1053
-
1054
- Performance/StringIdentifierArgument:
1078
+ Security/CompoundHash:
1055
1079
  Enabled: true
1056
1080
 
1057
1081
  Security/Eval:
1058
1082
  Enabled: true
1059
1083
 
1060
- Security/CompoundHash:
1061
- Enabled: true
1084
+ Security/IoMethods:
1085
+ Enabled: false
1086
+ Safe: false
1062
1087
 
1063
1088
  Security/JSONLoad:
1064
1089
  Enabled: true
@@ -1076,10 +1101,6 @@ Security/YAMLLoad:
1076
1101
  Enabled: true
1077
1102
  SafeAutoCorrect: false
1078
1103
 
1079
- Security/IoMethods:
1080
- Enabled: false
1081
- Safe: false
1082
-
1083
1104
  Standard/BlockSingleLineBraces:
1084
1105
  Enabled: true
1085
1106
 
@@ -1240,6 +1261,9 @@ Style/EmptyElse:
1240
1261
  Enabled: true
1241
1262
  EnforcedStyle: both
1242
1263
 
1264
+ Style/EmptyHeredoc:
1265
+ Enabled: false
1266
+
1243
1267
  Style/EmptyLambdaParameter:
1244
1268
  Enabled: true
1245
1269
 
@@ -1281,6 +1305,12 @@ Style/ExponentialNotation:
1281
1305
  Style/FetchEnvVar:
1282
1306
  Enabled: false
1283
1307
 
1308
+ Style/FileRead:
1309
+ Enabled: true
1310
+
1311
+ Style/FileWrite:
1312
+ Enabled: true
1313
+
1284
1314
  Style/FloatDivision:
1285
1315
  Enabled: false
1286
1316
 
@@ -1383,12 +1413,18 @@ Style/LineEndConcatenation:
1383
1413
  Enabled: true
1384
1414
  SafeAutoCorrect: false
1385
1415
 
1416
+ Style/MapCompactWithConditionalBlock:
1417
+ Enabled: true
1418
+
1419
+ Style/MapToHash:
1420
+ Enabled: false
1421
+
1386
1422
  Style/MethodCallWithArgsParentheses:
1387
1423
  Enabled: false
1388
1424
 
1389
1425
  Style/MethodCallWithoutArgsParentheses:
1390
1426
  Enabled: true
1391
- IgnoredMethods: []
1427
+ AllowedMethods: []
1392
1428
 
1393
1429
  Style/MethodCalledOnDoEndBlock:
1394
1430
  Enabled: false
@@ -1505,6 +1541,12 @@ Style/NonNilCheck:
1505
1541
  Style/Not:
1506
1542
  Enabled: true
1507
1543
 
1544
+ Style/NumberedParameters:
1545
+ Enabled: false
1546
+
1547
+ Style/NumberedParametersLimit:
1548
+ Enabled: false
1549
+
1508
1550
  Style/NumericLiteralPrefix:
1509
1551
  Enabled: true
1510
1552
  EnforcedOctalStyle: zero_with_o
@@ -1521,6 +1563,9 @@ Style/ObjectThen:
1521
1563
  Style/OneLineConditional:
1522
1564
  Enabled: true
1523
1565
 
1566
+ Style/OpenStructUse:
1567
+ Enabled: false
1568
+
1524
1569
  Style/OptionHash:
1525
1570
  Enabled: false
1526
1571
 
@@ -1666,6 +1711,9 @@ Style/SafeNavigation:
1666
1711
  Style/Sample:
1667
1712
  Enabled: true
1668
1713
 
1714
+ Style/SelectByRegexp:
1715
+ Enabled: false
1716
+
1669
1717
  Style/SelfAssignment:
1670
1718
  Enabled: true
1671
1719
 
@@ -1840,24 +1888,3 @@ Style/YodaCondition:
1840
1888
 
1841
1889
  Style/ZeroLengthPredicate:
1842
1890
  Enabled: false
1843
-
1844
- Style/NumberedParameters:
1845
- Enabled: false
1846
-
1847
- Style/NumberedParametersLimit:
1848
- Enabled: false
1849
-
1850
- Style/SelectByRegexp:
1851
- Enabled: false
1852
-
1853
- Style/OpenStructUse:
1854
- Enabled: false
1855
-
1856
- Style/MapToHash:
1857
- Enabled: false
1858
-
1859
- Style/FileWrite:
1860
- Enabled: true
1861
-
1862
- Style/FileRead:
1863
- Enabled: true
@@ -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.12.1")
2
+ VERSION = Gem::Version.new('1.15.0')
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.29.1"
23
- spec.add_dependency "rubocop-performance", "1.13.3"
22
+ spec.add_dependency "rubocop", "1.33.0"
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.12.1
4
+ version: 1.15.0
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-05-17 00:00:00.000000000 Z
11
+ date: 2022-08-09 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.29.1
19
+ version: 1.33.0
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.1
26
+ version: 1.33.0
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.3.6
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: []