standard 0.6.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -0
- data/Gemfile.lock +14 -14
- data/README.md +1 -0
- data/config/base.yml +57 -38
- data/config/ruby-1.8.yml +2 -3
- data/config/ruby-2.3.yml +0 -4
- data/lib/standard/cop/semantic_blocks.rb +5 -5
- data/lib/standard/version.rb +1 -1
- data/standard.gemspec +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dce5ce63f9e226f30eaaa25c24c99038f2007e79d636a6af0ad6e878cccef228
|
4
|
+
data.tar.gz: edc3e716e5a91a2e5ba0632aeb56a7d3902dd552aeb9c930b0f49b96b567ba48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 208f8e2885c0f243117e3c2545f5c828a693979298e6e3cac3e487e1b30d7fd9a22c2408a3b836d1aa601744c9d8ea010604a465be64d6a8972d9497fc2f7157
|
7
|
+
data.tar.gz: 6b6137108b78d58928688655467f117d72576ce8273cb47649ac482940363c2a5d091b979c72fc1d5d31055d5f5c2d7f0eb7733a26f309f750fd6d000b1104bf
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,42 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.10.0
|
4
|
+
|
5
|
+
* Update rubocop-performance from 1.8.1 to [1.9.1](https://github.com/rubocop-hq/rubocop-performance/releases/tag/v1.9.1) enabling:
|
6
|
+
* [`Performance/BlockGivenWithExplicitBlock`](https://github.com/rubocop-hq/rubocop-performance/pull/173)
|
7
|
+
* [`Performance/ConstantRegexp`](https://github.com/rubocop-hq/rubocop-performance/pull/174)
|
8
|
+
* [`Performance/ArraySemiInfiniteRangeSlice`](https://github.com/rubocop-hq/rubocop-performance/pull/175)
|
9
|
+
* Update rubocop from 1.2.0 to [1.4.2](https://github.com/rubocop-hq/rubocop/releases/tag/v1.4.2) enabling:
|
10
|
+
* [`Style/NilLambda`](https://github.com/rubocop-hq/rubocop/pull/9020)
|
11
|
+
* [`Lint/DuplicateBranch`](https://github.com/rubocop-hq/rubocop/pull/8404)
|
12
|
+
|
13
|
+
## 0.9.0
|
14
|
+
|
15
|
+
* Update rubocop from 1.0.0 to [1.2.0](https://github.com/rubocop-hq/rubocop/releases/tag/v1.2.0) enabling:
|
16
|
+
* [`Lint/DuplicateRegexpCharacterClassElement`](https://github.com/rubocop-hq/rubocop/pull/8896)
|
17
|
+
* [`Style/ArgumentsForwarding`](https://github.com/rubocop-hq/rubocop/pull/7646)
|
18
|
+
* Don't find offense in `Style/SemanticBlocks` when a top-level `rescue` is used
|
19
|
+
in a `do`/`end` functional block, fixing
|
20
|
+
[#205](https://github.com/testdouble/standard/issues/205)
|
21
|
+
|
22
|
+
## 0.8.1
|
23
|
+
|
24
|
+
* Make it match semver
|
25
|
+
|
26
|
+
## 0.8
|
27
|
+
|
28
|
+
* Update rubocop from 0.93.1 to [1.0.0](https://github.com/rubocop-hq/rubocop/releases/tag/v1.0.0)
|
29
|
+
* Update rubocop from 0.92 to
|
30
|
+
[0.93](https://github.com/rubocop-hq/rubocop/releases/tag/v0.93) to
|
31
|
+
[0.93.1](https://github.com/rubocop-hq/rubocop/releases/tag/v0.93.1) enabling:
|
32
|
+
* [`Style/ClassEqualityComparison`](https://github.com/rubocop-hq/rubocop/pull/8833)
|
33
|
+
* Disable `Performance/Sum` because #208 and the lack of actual auto-correcting is also causing more trouble
|
34
|
+
|
35
|
+
## 0.7
|
36
|
+
|
37
|
+
* Update rubocop from 0.91.1 to
|
38
|
+
[0.92](https://github.com/rubocop-hq/rubocop/releases/tag/v0.92)
|
39
|
+
|
3
40
|
## 0.6.2
|
4
41
|
|
5
42
|
* Update rubocop from 0.91 to
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
standard (0.
|
5
|
-
rubocop (=
|
6
|
-
rubocop-performance (= 1.
|
4
|
+
standard (0.10.0)
|
5
|
+
rubocop (= 1.4.2)
|
6
|
+
rubocop-performance (= 1.9.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -14,29 +14,29 @@ GEM
|
|
14
14
|
gimme (0.5.0)
|
15
15
|
method_source (1.0.0)
|
16
16
|
minitest (5.14.2)
|
17
|
-
parallel (1.
|
18
|
-
parser (2.7.
|
17
|
+
parallel (1.20.1)
|
18
|
+
parser (2.7.2.0)
|
19
19
|
ast (~> 2.4.1)
|
20
20
|
pry (0.13.1)
|
21
21
|
coderay (~> 1.1)
|
22
22
|
method_source (~> 1.0)
|
23
23
|
rainbow (3.0.0)
|
24
24
|
rake (13.0.1)
|
25
|
-
regexp_parser (
|
25
|
+
regexp_parser (2.0.0)
|
26
26
|
rexml (3.2.4)
|
27
|
-
rubocop (
|
27
|
+
rubocop (1.4.2)
|
28
28
|
parallel (~> 1.10)
|
29
|
-
parser (>= 2.7.1.
|
29
|
+
parser (>= 2.7.1.5)
|
30
30
|
rainbow (>= 2.2.2, < 4.0)
|
31
|
-
regexp_parser (>= 1.
|
31
|
+
regexp_parser (>= 1.8)
|
32
32
|
rexml
|
33
|
-
rubocop-ast (>=
|
33
|
+
rubocop-ast (>= 1.1.1)
|
34
34
|
ruby-progressbar (~> 1.7)
|
35
35
|
unicode-display_width (>= 1.4.0, < 2.0)
|
36
|
-
rubocop-ast (
|
37
|
-
parser (>= 2.7.1.
|
38
|
-
rubocop-performance (1.
|
39
|
-
rubocop (>= 0.
|
36
|
+
rubocop-ast (1.2.0)
|
37
|
+
parser (>= 2.7.1.5)
|
38
|
+
rubocop-performance (1.9.1)
|
39
|
+
rubocop (>= 0.90.0, < 2.0)
|
40
40
|
rubocop-ast (>= 0.4.0)
|
41
41
|
ruby-progressbar (1.10.1)
|
42
42
|
simplecov (0.19.0)
|
data/README.md
CHANGED
@@ -384,6 +384,7 @@ Maybe! Start by searching the repository to see if there's an existing issue ope
|
|
384
384
|
the tool you're interested in. That aside, here are other known integrations aside
|
385
385
|
from editor plugins:
|
386
386
|
|
387
|
+
* [Code Climate](https://github.com/testdouble/standard/wiki/CI:-Code-Climate)
|
387
388
|
* [Pronto](https://github.com/julianrubisch/pronto-standardrb)
|
388
389
|
* [Spring](https://github.com/lakim/spring-commands-standard)
|
389
390
|
* [Guard](https://github.com/JodyVanden/guard-standardrb)
|
data/config/base.yml
CHANGED
@@ -56,10 +56,10 @@ Layout/BlockAlignment:
|
|
56
56
|
Layout/BlockEndNewline:
|
57
57
|
Enabled: true
|
58
58
|
|
59
|
-
|
60
|
-
#
|
61
|
-
#
|
62
|
-
|
59
|
+
Layout/CaseIndentation:
|
60
|
+
# Disabled because IndentOneStep can't be configured for one-liner cases. See:
|
61
|
+
# https://github.com/rubocop-hq/rubocop/issues/6447
|
62
|
+
Enabled: false
|
63
63
|
|
64
64
|
Layout/ClosingHeredocIndentation:
|
65
65
|
Enabled: true
|
@@ -173,6 +173,10 @@ Layout/IndentationConsistency:
|
|
173
173
|
Enabled: true
|
174
174
|
EnforcedStyle: normal
|
175
175
|
|
176
|
+
Layout/IndentationStyle:
|
177
|
+
Enabled: true
|
178
|
+
IndentationWidth: ~
|
179
|
+
|
176
180
|
Layout/IndentationWidth:
|
177
181
|
Enabled: true
|
178
182
|
Width: 2
|
@@ -181,10 +185,10 @@ Layout/IndentationWidth:
|
|
181
185
|
Layout/InitialIndentation:
|
182
186
|
Enabled: true
|
183
187
|
|
184
|
-
Layout/
|
188
|
+
Layout/LeadingCommentSpace:
|
185
189
|
Enabled: true
|
186
190
|
|
187
|
-
Layout/
|
191
|
+
Layout/LeadingEmptyLines:
|
188
192
|
Enabled: true
|
189
193
|
|
190
194
|
Layout/MultilineArrayBraceLayout:
|
@@ -250,6 +254,9 @@ Layout/SpaceAroundEqualsInParameterDefault:
|
|
250
254
|
Layout/SpaceAroundKeyword:
|
251
255
|
Enabled: true
|
252
256
|
|
257
|
+
Layout/SpaceAroundMethodCallOperator:
|
258
|
+
Enabled: true
|
259
|
+
|
253
260
|
Layout/SpaceAroundOperators:
|
254
261
|
Enabled: true
|
255
262
|
AllowForAlignment: true
|
@@ -314,10 +321,6 @@ Layout/SpaceInsideStringInterpolation:
|
|
314
321
|
Enabled: true
|
315
322
|
EnforcedStyle: no_space
|
316
323
|
|
317
|
-
Layout/IndentationStyle:
|
318
|
-
Enabled: true
|
319
|
-
IndentationWidth: ~
|
320
|
-
|
321
324
|
Layout/TrailingEmptyLines:
|
322
325
|
Enabled: true
|
323
326
|
EnforcedStyle: final_newline
|
@@ -360,6 +363,9 @@ Lint/DeprecatedClassMethods:
|
|
360
363
|
Lint/DeprecatedOpenSSLConstant:
|
361
364
|
Enabled: true
|
362
365
|
|
366
|
+
Lint/DuplicateBranch:
|
367
|
+
Enabled: true
|
368
|
+
|
363
369
|
Lint/DuplicateCaseCondition:
|
364
370
|
Enabled: true
|
365
371
|
|
@@ -372,6 +378,9 @@ Lint/DuplicateHashKey:
|
|
372
378
|
Lint/DuplicateMethods:
|
373
379
|
Enabled: true
|
374
380
|
|
381
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
382
|
+
Enabled: true
|
383
|
+
|
375
384
|
Lint/DuplicateRequire:
|
376
385
|
Enabled: true
|
377
386
|
|
@@ -545,9 +554,6 @@ Lint/ShadowedArgument:
|
|
545
554
|
Lint/ShadowedException:
|
546
555
|
Enabled: true
|
547
556
|
|
548
|
-
Layout/SpaceAroundMethodCallOperator:
|
549
|
-
Enabled: true
|
550
|
-
|
551
557
|
Lint/Syntax:
|
552
558
|
Enabled: true
|
553
559
|
|
@@ -594,6 +600,13 @@ Migration/DepartmentName:
|
|
594
600
|
Naming/BinaryOperatorParameterName:
|
595
601
|
Enabled: true
|
596
602
|
|
603
|
+
Naming/BlockParameterName:
|
604
|
+
Enabled: true
|
605
|
+
MinNameLength: 1
|
606
|
+
AllowNamesEndingInNumbers: true
|
607
|
+
AllowedNames: []
|
608
|
+
ForbiddenNames: []
|
609
|
+
|
597
610
|
Naming/ClassAndModuleCamelCase:
|
598
611
|
Enabled: true
|
599
612
|
|
@@ -604,23 +617,22 @@ Naming/HeredocDelimiterCase:
|
|
604
617
|
Enabled: true
|
605
618
|
EnforcedStyle: uppercase
|
606
619
|
|
607
|
-
Naming/BlockParameterName:
|
608
|
-
Enabled: true
|
609
|
-
MinNameLength: 1
|
610
|
-
AllowNamesEndingInNumbers: true
|
611
|
-
AllowedNames: []
|
612
|
-
ForbiddenNames: []
|
613
|
-
|
614
620
|
Naming/VariableName:
|
615
621
|
Enabled: true
|
616
622
|
EnforcedStyle: snake_case
|
617
623
|
|
624
|
+
Performance/ArraySemiInfiniteRangeSlice:
|
625
|
+
Enabled: true
|
626
|
+
|
618
627
|
Performance/BigDecimalWithNumericArgument:
|
619
628
|
Enabled: true
|
620
629
|
|
621
630
|
Performance/BindCall:
|
622
631
|
Enabled: true
|
623
632
|
|
633
|
+
Performance/BlockGivenWithExplicitBlock:
|
634
|
+
Enabled: true
|
635
|
+
|
624
636
|
Performance/Caller:
|
625
637
|
Enabled: true
|
626
638
|
|
@@ -630,6 +642,9 @@ Performance/CollectionLiteralInLoop:
|
|
630
642
|
Performance/CompareWithBlock:
|
631
643
|
Enabled: true
|
632
644
|
|
645
|
+
Performance/ConstantRegexp:
|
646
|
+
Enabled: true
|
647
|
+
|
633
648
|
Performance/Count:
|
634
649
|
Enabled: true
|
635
650
|
|
@@ -701,10 +716,6 @@ Performance/StartWith:
|
|
701
716
|
Performance/StringReplacement:
|
702
717
|
Enabled: true
|
703
718
|
|
704
|
-
Performance/Sum:
|
705
|
-
Enabled: true
|
706
|
-
AutoCorrect: true
|
707
|
-
|
708
719
|
Performance/UnfreezeString:
|
709
720
|
Enabled: true
|
710
721
|
|
@@ -727,7 +738,6 @@ Security/YAMLLoad:
|
|
727
738
|
Enabled: true
|
728
739
|
SafeAutoCorrect: false
|
729
740
|
|
730
|
-
|
731
741
|
Standard/SemanticBlocks:
|
732
742
|
ProceduralMethods:
|
733
743
|
- benchmark
|
@@ -770,6 +780,10 @@ Style/AndOr:
|
|
770
780
|
Enabled: true
|
771
781
|
EnforcedStyle: always
|
772
782
|
|
783
|
+
Style/ArgumentsForwarding:
|
784
|
+
Enabled: true
|
785
|
+
AllowOnlyRestArgument: true
|
786
|
+
|
773
787
|
Style/ArrayJoin:
|
774
788
|
Enabled: true
|
775
789
|
|
@@ -793,6 +807,9 @@ Style/ClassCheck:
|
|
793
807
|
Enabled: true
|
794
808
|
EnforcedStyle: is_a?
|
795
809
|
|
810
|
+
Style/ClassEqualityComparison:
|
811
|
+
Enabled: true
|
812
|
+
|
796
813
|
Style/ClassMethods:
|
797
814
|
Enabled: true
|
798
815
|
|
@@ -887,7 +904,6 @@ Style/IfWithSemicolon:
|
|
887
904
|
|
888
905
|
Style/InfiniteLoop:
|
889
906
|
Enabled: true
|
890
|
-
SafeAutoCorrect: true
|
891
907
|
|
892
908
|
Style/KeywordParametersOrder:
|
893
909
|
Enabled: true
|
@@ -965,6 +981,9 @@ Style/NilComparison:
|
|
965
981
|
Enabled: true
|
966
982
|
EnforcedStyle: predicate
|
967
983
|
|
984
|
+
Style/NilLambda:
|
985
|
+
Enabled: true
|
986
|
+
|
968
987
|
Style/NonNilCheck:
|
969
988
|
Enabled: true
|
970
989
|
IncludeSemanticChanges: false
|
@@ -1012,6 +1031,9 @@ Style/RedundantAssignment:
|
|
1012
1031
|
Style/RedundantBegin:
|
1013
1032
|
Enabled: true
|
1014
1033
|
|
1034
|
+
Style/RedundantCondition:
|
1035
|
+
Enabled: true
|
1036
|
+
|
1015
1037
|
Style/RedundantConditional:
|
1016
1038
|
Enabled: true
|
1017
1039
|
|
@@ -1027,9 +1049,15 @@ Style/RedundantFileExtensionInRequire:
|
|
1027
1049
|
Style/RedundantFreeze:
|
1028
1050
|
Enabled: true
|
1029
1051
|
|
1052
|
+
Style/RedundantInterpolation:
|
1053
|
+
Enabled: true
|
1054
|
+
|
1030
1055
|
Style/RedundantParentheses:
|
1031
1056
|
Enabled: true
|
1032
1057
|
|
1058
|
+
Style/RedundantPercentQ:
|
1059
|
+
Enabled: true
|
1060
|
+
|
1033
1061
|
Style/RedundantRegexpCharacterClass:
|
1034
1062
|
Enabled: true
|
1035
1063
|
|
@@ -1043,6 +1071,9 @@ Style/RedundantReturn:
|
|
1043
1071
|
Style/RedundantSelf:
|
1044
1072
|
Enabled: true
|
1045
1073
|
|
1074
|
+
Style/RedundantSort:
|
1075
|
+
Enabled: true
|
1076
|
+
|
1046
1077
|
Style/RedundantSortBy:
|
1047
1078
|
Enabled: true
|
1048
1079
|
|
@@ -1159,18 +1190,6 @@ Style/TrivialAccessors:
|
|
1159
1190
|
Style/UnlessElse:
|
1160
1191
|
Enabled: true
|
1161
1192
|
|
1162
|
-
Style/RedundantCondition:
|
1163
|
-
Enabled: true
|
1164
|
-
|
1165
|
-
Style/RedundantInterpolation:
|
1166
|
-
Enabled: true
|
1167
|
-
|
1168
|
-
Style/RedundantPercentQ:
|
1169
|
-
Enabled: true
|
1170
|
-
|
1171
|
-
Style/RedundantSort:
|
1172
|
-
Enabled: true
|
1173
|
-
|
1174
1193
|
Style/UnpackFirst:
|
1175
1194
|
Enabled: true
|
1176
1195
|
|
data/config/ruby-1.8.yml
CHANGED
data/config/ruby-2.3.yml
CHANGED
@@ -18,7 +18,9 @@ module RuboCop::Cop
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def on_block(node)
|
21
|
-
return if ignored_node?(node) ||
|
21
|
+
return if ignored_node?(node) ||
|
22
|
+
proper_block_style?(node) ||
|
23
|
+
(!node.braces? && rescue_child_block?(node))
|
22
24
|
|
23
25
|
add_offense(node, location: :begin)
|
24
26
|
end
|
@@ -26,9 +28,7 @@ module RuboCop::Cop
|
|
26
28
|
def autocorrect(node)
|
27
29
|
return if correction_would_break_code?(node)
|
28
30
|
|
29
|
-
if node.
|
30
|
-
replace_do_end_with_braces(node.loc)
|
31
|
-
elsif node.braces?
|
31
|
+
if node.braces?
|
32
32
|
replace_braces_with_do_end(node.loc)
|
33
33
|
else
|
34
34
|
replace_do_end_with_braces(node.loc)
|
@@ -118,7 +118,7 @@ module RuboCop::Cop
|
|
118
118
|
end
|
119
119
|
|
120
120
|
def rescue_child_block?(node)
|
121
|
-
node.children.any?
|
121
|
+
node.children.any? { |node| node.rescue_type? || node.ensure_type? }
|
122
122
|
end
|
123
123
|
|
124
124
|
def non_parenthesized_keyword_args?(node)
|
data/lib/standard/version.rb
CHANGED
data/standard.gemspec
CHANGED
@@ -19,8 +19,8 @@ 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", "
|
23
|
-
spec.add_dependency "rubocop-performance", "1.
|
22
|
+
spec.add_dependency "rubocop", "1.4.2"
|
23
|
+
spec.add_dependency "rubocop-performance", "1.9.1"
|
24
24
|
|
25
25
|
spec.add_development_dependency "bundler"
|
26
26
|
spec.add_development_dependency "minitest", "~> 5.0"
|
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: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Searls
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.4.2
|
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:
|
26
|
+
version: 1.4.2
|
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.
|
33
|
+
version: 1.9.1
|
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.
|
40
|
+
version: 1.9.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
- !ruby/object:Gem::Version
|
191
191
|
version: '0'
|
192
192
|
requirements: []
|
193
|
-
rubygems_version: 3.1.
|
193
|
+
rubygems_version: 3.1.4
|
194
194
|
signing_key:
|
195
195
|
specification_version: 4
|
196
196
|
summary: Ruby Style Guide, with linter & automatic code fixer
|