reek 5.0.1 → 5.0.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 +5 -0
- data/features/command_line_interface/options.feature +2 -2
- data/features/reports/json.feature +3 -3
- data/features/reports/reports.feature +4 -4
- data/features/reports/yaml.feature +3 -3
- data/lib/reek/ast/sexp_extensions/case.rb +3 -1
- data/lib/reek/ast/sexp_extensions/if.rb +1 -1
- data/lib/reek/ast/sexp_extensions/logical_operators.rb +1 -1
- data/lib/reek/version.rb +1 -1
- data/reek.gemspec +1 -1
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bcb2aafdd323d869bc486bfde721dfa290d8faa
|
4
|
+
data.tar.gz: 1a63a1bbaadcd3ae873a85f8560024124aeddf5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b812c771f685ac34d1c6c240ca259b467cb9a19db49264aef1340118e74f62053113313ebcf644177d37600a70d205f2215378b9f7bb3a8f51d137b20e5d534c
|
7
|
+
data.tar.gz: 80769603222b66562779e6690d35931eae51504eadd3fda1fce2764dcd9f9d54f2b6b26cce9a5503ba07e13239df75b4a5cecae936768fafad294d1699bbadf7
|
data/CHANGELOG.md
CHANGED
@@ -43,7 +43,7 @@ Feature: Reek can be controlled using command-line options
|
|
43
43
|
-c, --config FILE Read configuration options from FILE
|
44
44
|
--smell SMELL Only look for a specific smell.
|
45
45
|
Call it like this: reek --smell MissingSafeMethod source.rb
|
46
|
-
Check out https://github.com/troessner/reek/blob/v5.0.
|
46
|
+
Check out https://github.com/troessner/reek/blob/v5.0.2/docs/Code-Smells.md for a list of smells
|
47
47
|
--stdin-filename FILE When passing code in via pipe, assume this filename when checking file or directory rules in the config.
|
48
48
|
|
49
49
|
Generate a todo list:
|
@@ -118,5 +118,5 @@ Feature: Reek can be controlled using command-line options
|
|
118
118
|
UnusedPrivateMethod
|
119
119
|
UtilityFunction
|
120
120
|
|
121
|
-
Check out https://github.com/troessner/reek/blob/v5.0.
|
121
|
+
Check out https://github.com/troessner/reek/blob/v5.0.2/docs/Code-Smells.md for a details on each detector
|
122
122
|
"""
|
@@ -24,7 +24,7 @@ Feature: Report smells using simple JSON layout
|
|
24
24
|
"context": "Smelly#x",
|
25
25
|
"lines": [ 4 ],
|
26
26
|
"message": "has the name 'x'",
|
27
|
-
"documentation_link": "https://github.com/troessner/reek/blob/v5.0.
|
27
|
+
"documentation_link": "https://github.com/troessner/reek/blob/v5.0.2/docs/Uncommunicative-Method-Name.md",
|
28
28
|
"name": "x"
|
29
29
|
},
|
30
30
|
{
|
@@ -33,7 +33,7 @@ Feature: Report smells using simple JSON layout
|
|
33
33
|
"context": "Smelly#x",
|
34
34
|
"lines": [ 5 ],
|
35
35
|
"message": "has the variable name 'y'",
|
36
|
-
"documentation_link": "https://github.com/troessner/reek/blob/v5.0.
|
36
|
+
"documentation_link": "https://github.com/troessner/reek/blob/v5.0.2/docs/Uncommunicative-Variable-Name.md",
|
37
37
|
"name": "y"
|
38
38
|
}
|
39
39
|
]
|
@@ -53,7 +53,7 @@ Feature: Report smells using simple JSON layout
|
|
53
53
|
1
|
54
54
|
],
|
55
55
|
"message": "has no descriptive comment",
|
56
|
-
"documentation_link": "https://github.com/troessner/reek/blob/v5.0.
|
56
|
+
"documentation_link": "https://github.com/troessner/reek/blob/v5.0.2/docs/Irresponsible-Module.md"
|
57
57
|
}
|
58
58
|
]
|
59
59
|
"""
|
@@ -182,8 +182,8 @@ Feature: Correctly formatted reports
|
|
182
182
|
And it reports:
|
183
183
|
"""
|
184
184
|
smelly.rb -- 2 warnings:
|
185
|
-
[4]:UncommunicativeMethodName: Smelly#x has the name 'x' [https://github.com/troessner/reek/blob/v5.0.
|
186
|
-
[5]:UncommunicativeVariableName: Smelly#x has the variable name 'y' [https://github.com/troessner/reek/blob/v5.0.
|
185
|
+
[4]:UncommunicativeMethodName: Smelly#x has the name 'x' [https://github.com/troessner/reek/blob/v5.0.2/docs/Uncommunicative-Method-Name.md]
|
186
|
+
[5]:UncommunicativeVariableName: Smelly#x has the variable name 'y' [https://github.com/troessner/reek/blob/v5.0.2/docs/Uncommunicative-Variable-Name.md]
|
187
187
|
"""
|
188
188
|
|
189
189
|
Examples:
|
@@ -209,8 +209,8 @@ Feature: Correctly formatted reports
|
|
209
209
|
And it reports:
|
210
210
|
"""
|
211
211
|
smelly.rb -- 2 warnings:
|
212
|
-
UncommunicativeMethodName: Smelly#x has the name 'x' [https://github.com/troessner/reek/blob/v5.0.
|
213
|
-
UncommunicativeVariableName: Smelly#x has the variable name 'y' [https://github.com/troessner/reek/blob/v5.0.
|
212
|
+
UncommunicativeMethodName: Smelly#x has the name 'x' [https://github.com/troessner/reek/blob/v5.0.2/docs/Uncommunicative-Method-Name.md]
|
213
|
+
UncommunicativeVariableName: Smelly#x has the variable name 'y' [https://github.com/troessner/reek/blob/v5.0.2/docs/Uncommunicative-Variable-Name.md]
|
214
214
|
"""
|
215
215
|
|
216
216
|
Examples:
|
@@ -25,7 +25,7 @@ Feature: Report smells using simple YAML layout
|
|
25
25
|
smell_type: UncommunicativeMethodName
|
26
26
|
source: smelly.rb
|
27
27
|
name: x
|
28
|
-
documentation_link: https://github.com/troessner/reek/blob/v5.0.
|
28
|
+
documentation_link: https://github.com/troessner/reek/blob/v5.0.2/docs/Uncommunicative-Method-Name.md
|
29
29
|
- context: Smelly#x
|
30
30
|
lines:
|
31
31
|
- 5
|
@@ -33,7 +33,7 @@ Feature: Report smells using simple YAML layout
|
|
33
33
|
smell_type: UncommunicativeVariableName
|
34
34
|
source: smelly.rb
|
35
35
|
name: y
|
36
|
-
documentation_link: https://github.com/troessner/reek/blob/v5.0.
|
36
|
+
documentation_link: https://github.com/troessner/reek/blob/v5.0.2/docs/Uncommunicative-Variable-Name.md
|
37
37
|
"""
|
38
38
|
|
39
39
|
Scenario: Indicate smells and print them as yaml when using STDIN
|
@@ -48,5 +48,5 @@ Feature: Report smells using simple YAML layout
|
|
48
48
|
lines:
|
49
49
|
- 1
|
50
50
|
message: has no descriptive comment
|
51
|
-
documentation_link: https://github.com/troessner/reek/blob/v5.0.
|
51
|
+
documentation_link: https://github.com/troessner/reek/blob/v5.0.2/docs/Irresponsible-Module.md
|
52
52
|
"""
|
@@ -10,7 +10,9 @@ module Reek
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def body_nodes(type, ignoring = [])
|
13
|
-
children[1..-1].compact.flat_map
|
13
|
+
children[1..-1].compact.flat_map do |child|
|
14
|
+
child.each_node(type, ignoring | type).to_a
|
15
|
+
end
|
14
16
|
end
|
15
17
|
|
16
18
|
def else_body
|
data/lib/reek/version.rb
CHANGED
data/reek.gemspec
CHANGED
@@ -21,6 +21,6 @@ Gem::Specification.new do |s|
|
|
21
21
|
|
22
22
|
s.add_runtime_dependency 'codeclimate-engine-rb', '~> 0.4.0'
|
23
23
|
s.add_runtime_dependency 'kwalify', '~> 0.7.0'
|
24
|
-
s.add_runtime_dependency 'parser', '< 2.6', '>= 2.5.0.0'
|
24
|
+
s.add_runtime_dependency 'parser', '< 2.6', '>= 2.5.0.0', '!= 2.5.1.1'
|
25
25
|
s.add_runtime_dependency 'rainbow', '>= 2.0', '< 4.0'
|
26
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reek
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Rutherford
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-07-
|
14
|
+
date: 2018-07-10 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: codeclimate-engine-rb
|
@@ -51,6 +51,9 @@ dependencies:
|
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: 2.5.0.0
|
54
|
+
- - "!="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 2.5.1.1
|
54
57
|
type: :runtime
|
55
58
|
prerelease: false
|
56
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -61,6 +64,9 @@ dependencies:
|
|
61
64
|
- - ">="
|
62
65
|
- !ruby/object:Gem::Version
|
63
66
|
version: 2.5.0.0
|
67
|
+
- - "!="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 2.5.1.1
|
64
70
|
- !ruby/object:Gem::Dependency
|
65
71
|
name: rainbow
|
66
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -475,7 +481,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
475
481
|
version: '0'
|
476
482
|
requirements: []
|
477
483
|
rubyforge_project:
|
478
|
-
rubygems_version: 2.5.
|
484
|
+
rubygems_version: 2.5.2.2
|
479
485
|
signing_key:
|
480
486
|
specification_version: 4
|
481
487
|
summary: Code smell detector for Ruby
|