standard 0.8 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/Gemfile.lock +10 -10
- data/config/base.yml +48 -34
- data/config/ruby-1.8.yml +2 -3
- data/lib/standard/cop/semantic_blocks.rb +5 -5
- data/lib/standard/version.rb +1 -1
- data/standard.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d321223bc503dbd20a61bbfedcc5b5add5f4d327e2807646d06b9e0dac215094
|
4
|
+
data.tar.gz: 55a9caa17e48d3bd6d3d1e79fe36209520ff9347e73e50e8f9938d501610d9c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 671a7fbb708de9c209a2da970d33666557823a6b87d4ba59b1c74d591347300d1b50aa3d50808f5a16b0530482dfc85eed3f80eb84df3f1649b44d29681382a0
|
7
|
+
data.tar.gz: 1ccc5a54fe626bca0a4aff7b7e24419a6114aa846a2494bffe5d45dc838f8922d3572ec40d2fbe6c615b499798be1417bbc6c1efc8d4e1eb80733dd7bb5f9fcf
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,37 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.10.2
|
4
|
+
|
5
|
+
* Remove
|
6
|
+
[`Lint/DuplicateBranch`](https://github.com/testdouble/standard/pull/228)
|
7
|
+
|
8
|
+
## 0.10.1
|
9
|
+
|
10
|
+
* Remove [`Performance/ArraySemiInfiniteRangeSlice`](https://github.com/testdouble/standard/pull/225#discussion_r532678908)
|
11
|
+
|
12
|
+
## 0.10.0
|
13
|
+
|
14
|
+
* Update rubocop-performance from 1.8.1 to [1.9.1](https://github.com/rubocop-hq/rubocop-performance/releases/tag/v1.9.1) enabling:
|
15
|
+
* [`Performance/BlockGivenWithExplicitBlock`](https://github.com/rubocop-hq/rubocop-performance/pull/173)
|
16
|
+
* [`Performance/ConstantRegexp`](https://github.com/rubocop-hq/rubocop-performance/pull/174)
|
17
|
+
* [`Performance/ArraySemiInfiniteRangeSlice`](https://github.com/rubocop-hq/rubocop-performance/pull/175)
|
18
|
+
* Update rubocop from 1.2.0 to [1.4.2](https://github.com/rubocop-hq/rubocop/releases/tag/v1.4.2) enabling:
|
19
|
+
* [`Style/NilLambda`](https://github.com/rubocop-hq/rubocop/pull/9020)
|
20
|
+
* [`Lint/DuplicateBranch`](https://github.com/rubocop-hq/rubocop/pull/8404)
|
21
|
+
|
22
|
+
## 0.9.0
|
23
|
+
|
24
|
+
* Update rubocop from 1.0.0 to [1.2.0](https://github.com/rubocop-hq/rubocop/releases/tag/v1.2.0) enabling:
|
25
|
+
* [`Lint/DuplicateRegexpCharacterClassElement`](https://github.com/rubocop-hq/rubocop/pull/8896)
|
26
|
+
* [`Style/ArgumentsForwarding`](https://github.com/rubocop-hq/rubocop/pull/7646)
|
27
|
+
* Don't find offense in `Style/SemanticBlocks` when a top-level `rescue` is used
|
28
|
+
in a `do`/`end` functional block, fixing
|
29
|
+
[#205](https://github.com/testdouble/standard/issues/205)
|
30
|
+
|
31
|
+
## 0.8.1
|
32
|
+
|
33
|
+
* Make it match semver
|
34
|
+
|
3
35
|
## 0.8
|
4
36
|
|
5
37
|
* Update rubocop from 0.93.1 to [1.0.0](https://github.com/rubocop-hq/rubocop/releases/tag/v1.0.0)
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
standard (0.
|
5
|
-
rubocop (= 1.
|
6
|
-
rubocop-performance (= 1.
|
4
|
+
standard (0.10.2)
|
5
|
+
rubocop (= 1.4.2)
|
6
|
+
rubocop-performance (= 1.9.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -14,7 +14,7 @@ GEM
|
|
14
14
|
gimme (0.5.0)
|
15
15
|
method_source (1.0.0)
|
16
16
|
minitest (5.14.2)
|
17
|
-
parallel (1.
|
17
|
+
parallel (1.20.1)
|
18
18
|
parser (2.7.2.0)
|
19
19
|
ast (~> 2.4.1)
|
20
20
|
pry (0.13.1)
|
@@ -22,21 +22,21 @@ GEM
|
|
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 (1.
|
27
|
+
rubocop (1.4.2)
|
28
28
|
parallel (~> 1.10)
|
29
29
|
parser (>= 2.7.1.5)
|
30
30
|
rainbow (>= 2.2.2, < 4.0)
|
31
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 (1.
|
36
|
+
rubocop-ast (1.3.0)
|
37
37
|
parser (>= 2.7.1.5)
|
38
|
-
rubocop-performance (1.
|
39
|
-
rubocop (>= 0.
|
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/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
|
@@ -372,6 +375,9 @@ Lint/DuplicateHashKey:
|
|
372
375
|
Lint/DuplicateMethods:
|
373
376
|
Enabled: true
|
374
377
|
|
378
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
379
|
+
Enabled: true
|
380
|
+
|
375
381
|
Lint/DuplicateRequire:
|
376
382
|
Enabled: true
|
377
383
|
|
@@ -545,9 +551,6 @@ Lint/ShadowedArgument:
|
|
545
551
|
Lint/ShadowedException:
|
546
552
|
Enabled: true
|
547
553
|
|
548
|
-
Layout/SpaceAroundMethodCallOperator:
|
549
|
-
Enabled: true
|
550
|
-
|
551
554
|
Lint/Syntax:
|
552
555
|
Enabled: true
|
553
556
|
|
@@ -594,6 +597,13 @@ Migration/DepartmentName:
|
|
594
597
|
Naming/BinaryOperatorParameterName:
|
595
598
|
Enabled: true
|
596
599
|
|
600
|
+
Naming/BlockParameterName:
|
601
|
+
Enabled: true
|
602
|
+
MinNameLength: 1
|
603
|
+
AllowNamesEndingInNumbers: true
|
604
|
+
AllowedNames: []
|
605
|
+
ForbiddenNames: []
|
606
|
+
|
597
607
|
Naming/ClassAndModuleCamelCase:
|
598
608
|
Enabled: true
|
599
609
|
|
@@ -604,13 +614,6 @@ Naming/HeredocDelimiterCase:
|
|
604
614
|
Enabled: true
|
605
615
|
EnforcedStyle: uppercase
|
606
616
|
|
607
|
-
Naming/BlockParameterName:
|
608
|
-
Enabled: true
|
609
|
-
MinNameLength: 1
|
610
|
-
AllowNamesEndingInNumbers: true
|
611
|
-
AllowedNames: []
|
612
|
-
ForbiddenNames: []
|
613
|
-
|
614
617
|
Naming/VariableName:
|
615
618
|
Enabled: true
|
616
619
|
EnforcedStyle: snake_case
|
@@ -621,6 +624,9 @@ Performance/BigDecimalWithNumericArgument:
|
|
621
624
|
Performance/BindCall:
|
622
625
|
Enabled: true
|
623
626
|
|
627
|
+
Performance/BlockGivenWithExplicitBlock:
|
628
|
+
Enabled: true
|
629
|
+
|
624
630
|
Performance/Caller:
|
625
631
|
Enabled: true
|
626
632
|
|
@@ -630,6 +636,9 @@ Performance/CollectionLiteralInLoop:
|
|
630
636
|
Performance/CompareWithBlock:
|
631
637
|
Enabled: true
|
632
638
|
|
639
|
+
Performance/ConstantRegexp:
|
640
|
+
Enabled: true
|
641
|
+
|
633
642
|
Performance/Count:
|
634
643
|
Enabled: true
|
635
644
|
|
@@ -723,7 +732,6 @@ Security/YAMLLoad:
|
|
723
732
|
Enabled: true
|
724
733
|
SafeAutoCorrect: false
|
725
734
|
|
726
|
-
|
727
735
|
Standard/SemanticBlocks:
|
728
736
|
ProceduralMethods:
|
729
737
|
- benchmark
|
@@ -766,6 +774,10 @@ Style/AndOr:
|
|
766
774
|
Enabled: true
|
767
775
|
EnforcedStyle: always
|
768
776
|
|
777
|
+
Style/ArgumentsForwarding:
|
778
|
+
Enabled: true
|
779
|
+
AllowOnlyRestArgument: true
|
780
|
+
|
769
781
|
Style/ArrayJoin:
|
770
782
|
Enabled: true
|
771
783
|
|
@@ -886,7 +898,6 @@ Style/IfWithSemicolon:
|
|
886
898
|
|
887
899
|
Style/InfiniteLoop:
|
888
900
|
Enabled: true
|
889
|
-
SafeAutoCorrect: true
|
890
901
|
|
891
902
|
Style/KeywordParametersOrder:
|
892
903
|
Enabled: true
|
@@ -964,6 +975,9 @@ Style/NilComparison:
|
|
964
975
|
Enabled: true
|
965
976
|
EnforcedStyle: predicate
|
966
977
|
|
978
|
+
Style/NilLambda:
|
979
|
+
Enabled: true
|
980
|
+
|
967
981
|
Style/NonNilCheck:
|
968
982
|
Enabled: true
|
969
983
|
IncludeSemanticChanges: false
|
@@ -1011,6 +1025,9 @@ Style/RedundantAssignment:
|
|
1011
1025
|
Style/RedundantBegin:
|
1012
1026
|
Enabled: true
|
1013
1027
|
|
1028
|
+
Style/RedundantCondition:
|
1029
|
+
Enabled: true
|
1030
|
+
|
1014
1031
|
Style/RedundantConditional:
|
1015
1032
|
Enabled: true
|
1016
1033
|
|
@@ -1026,9 +1043,15 @@ Style/RedundantFileExtensionInRequire:
|
|
1026
1043
|
Style/RedundantFreeze:
|
1027
1044
|
Enabled: true
|
1028
1045
|
|
1046
|
+
Style/RedundantInterpolation:
|
1047
|
+
Enabled: true
|
1048
|
+
|
1029
1049
|
Style/RedundantParentheses:
|
1030
1050
|
Enabled: true
|
1031
1051
|
|
1052
|
+
Style/RedundantPercentQ:
|
1053
|
+
Enabled: true
|
1054
|
+
|
1032
1055
|
Style/RedundantRegexpCharacterClass:
|
1033
1056
|
Enabled: true
|
1034
1057
|
|
@@ -1042,6 +1065,9 @@ Style/RedundantReturn:
|
|
1042
1065
|
Style/RedundantSelf:
|
1043
1066
|
Enabled: true
|
1044
1067
|
|
1068
|
+
Style/RedundantSort:
|
1069
|
+
Enabled: true
|
1070
|
+
|
1045
1071
|
Style/RedundantSortBy:
|
1046
1072
|
Enabled: true
|
1047
1073
|
|
@@ -1158,18 +1184,6 @@ Style/TrivialAccessors:
|
|
1158
1184
|
Style/UnlessElse:
|
1159
1185
|
Enabled: true
|
1160
1186
|
|
1161
|
-
Style/RedundantCondition:
|
1162
|
-
Enabled: true
|
1163
|
-
|
1164
|
-
Style/RedundantInterpolation:
|
1165
|
-
Enabled: true
|
1166
|
-
|
1167
|
-
Style/RedundantPercentQ:
|
1168
|
-
Enabled: true
|
1169
|
-
|
1170
|
-
Style/RedundantSort:
|
1171
|
-
Enabled: true
|
1172
|
-
|
1173
1187
|
Style/UnpackFirst:
|
1174
1188
|
Enabled: true
|
1175
1189
|
|
data/config/ruby-1.8.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", "1.
|
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:
|
4
|
+
version: 0.10.2
|
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-12-04 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: 1.
|
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: 1.
|
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
|