reek 5.4.1 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -3
- data/README.md +4 -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/source/source_code.rb +3 -2
- data/lib/reek/version.rb +1 -1
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b3b65a38361c8f39a732b5902f9ee84181d3c90da8af1c4fcb7445f1b9c2471
|
4
|
+
data.tar.gz: 7dc904ae5e9f98b757a7c007e1d96bf86773f6024b823cf0fe564a95304ed826
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6534b0dd5502776c06443bcd1b9fc5047179e93511ed2ea1ea507c4566a5e5bb53b3f6bd697045771e060e1332698c6141e1437f6a26bac66db597e0d5116fd7
|
7
|
+
data.tar.gz: 235d484485c0d7d01bde1acb4b268431010505f69d2a8b7fcd1ce14016cbad9854aa09b9a42ea4db0f8489b75d0c711f937b021d0140a57813e4e5774ed8a00c
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,15 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
-
##
|
3
|
+
## 5.5.0 (2019-11-13)
|
4
|
+
|
5
|
+
* (mvz) Use the Parser class matching current ruby for parsing, instead of
|
6
|
+
always picking version 2.6.
|
4
7
|
|
5
8
|
## 5.4.1 (2019-11-12)
|
6
9
|
|
7
|
-
* (Filipe Esperandio) Bump base image to a more recent ruby version
|
8
|
-
* (Fernando Contreras) Add quotes inside directory configuration
|
10
|
+
* (Filipe Esperandio) Bump base Docker image to a more recent ruby version
|
11
|
+
* (Fernando Contreras) Add quotes inside directory configuration example in
|
12
|
+
README
|
9
13
|
|
10
14
|
## 5.4.0 (2019-04-24)
|
11
15
|
|
data/README.md
CHANGED
@@ -104,6 +104,10 @@ Reek is officially supported for CRuby 2.3 to 2.6 and for JRuby 9.1 and 9.2.
|
|
104
104
|
Other Ruby implementations (like Rubinius) are not officially supported but
|
105
105
|
should work as well.
|
106
106
|
|
107
|
+
Note that, on each Ruby version, Reek will use the parser for that version of
|
108
|
+
Ruby. So, you should always run Reek using one of your project's target Ruby
|
109
|
+
versions.
|
110
|
+
|
107
111
|
## Fixing Smell Warnings
|
108
112
|
|
109
113
|
Reek focuses on high-level code smells, so we can't tell you how to fix warnings in
|
@@ -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.
|
46
|
+
Check out https://github.com/troessner/reek/blob/v5.5.0/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:
|
@@ -120,5 +120,5 @@ Feature: Reek can be controlled using command-line options
|
|
120
120
|
UnusedPrivateMethod
|
121
121
|
UtilityFunction
|
122
122
|
|
123
|
-
Check out https://github.com/troessner/reek/blob/v5.
|
123
|
+
Check out https://github.com/troessner/reek/blob/v5.5.0/docs/Code-Smells.md for a details on each detector
|
124
124
|
"""
|
@@ -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.
|
27
|
+
"documentation_link": "https://github.com/troessner/reek/blob/v5.5.0/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.
|
36
|
+
"documentation_link": "https://github.com/troessner/reek/blob/v5.5.0/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.
|
56
|
+
"documentation_link": "https://github.com/troessner/reek/blob/v5.5.0/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.
|
186
|
-
[5]:UncommunicativeVariableName: Smelly#x has the variable name 'y' [https://github.com/troessner/reek/blob/v5.
|
185
|
+
[4]:UncommunicativeMethodName: Smelly#x has the name 'x' [https://github.com/troessner/reek/blob/v5.5.0/docs/Uncommunicative-Method-Name.md]
|
186
|
+
[5]:UncommunicativeVariableName: Smelly#x has the variable name 'y' [https://github.com/troessner/reek/blob/v5.5.0/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.
|
213
|
-
UncommunicativeVariableName: Smelly#x has the variable name 'y' [https://github.com/troessner/reek/blob/v5.
|
212
|
+
UncommunicativeMethodName: Smelly#x has the name 'x' [https://github.com/troessner/reek/blob/v5.5.0/docs/Uncommunicative-Method-Name.md]
|
213
|
+
UncommunicativeVariableName: Smelly#x has the variable name 'y' [https://github.com/troessner/reek/blob/v5.5.0/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.
|
28
|
+
documentation_link: https://github.com/troessner/reek/blob/v5.5.0/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.
|
36
|
+
documentation_link: https://github.com/troessner/reek/blob/v5.5.0/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.
|
51
|
+
documentation_link: https://github.com/troessner/reek/blob/v5.5.0/docs/Irresponsible-Module.md
|
52
52
|
"""
|
@@ -1,7 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative '../cli/silencer'
|
4
|
-
|
4
|
+
# Silence Parser's warnings about Ruby micro version differences
|
5
|
+
Reek::CLI::Silencer.silently { require 'parser/current' }
|
5
6
|
require_relative '../tree_dresser'
|
6
7
|
require_relative '../ast/node'
|
7
8
|
require_relative '../ast/builder'
|
@@ -53,7 +54,7 @@ module Reek
|
|
53
54
|
end
|
54
55
|
|
55
56
|
def self.default_parser
|
56
|
-
Parser::
|
57
|
+
Parser::CurrentRuby.new(AST::Builder.new).tap do |parser|
|
57
58
|
diagnostics = parser.diagnostics
|
58
59
|
diagnostics.all_errors_are_fatal = true
|
59
60
|
diagnostics.ignore_warnings = true
|
data/lib/reek/version.rb
CHANGED
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.
|
4
|
+
version: 5.5.0
|
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: 2019-11-
|
14
|
+
date: 2019-11-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: codeclimate-engine-rb
|
@@ -45,28 +45,28 @@ dependencies:
|
|
45
45
|
name: parser
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- - "<"
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: '2.7'
|
51
48
|
- - ">="
|
52
49
|
- !ruby/object:Gem::Version
|
53
50
|
version: 2.5.0.0
|
54
51
|
- - "!="
|
55
52
|
- !ruby/object:Gem::Version
|
56
53
|
version: 2.5.1.1
|
54
|
+
- - "<"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '2.7'
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- - "<"
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '2.7'
|
64
61
|
- - ">="
|
65
62
|
- !ruby/object:Gem::Version
|
66
63
|
version: 2.5.0.0
|
67
64
|
- - "!="
|
68
65
|
- !ruby/object:Gem::Version
|
69
66
|
version: 2.5.1.1
|
67
|
+
- - "<"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '2.7'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: psych
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -499,8 +499,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
499
499
|
- !ruby/object:Gem::Version
|
500
500
|
version: '0'
|
501
501
|
requirements: []
|
502
|
-
|
503
|
-
rubygems_version: 2.7.7
|
502
|
+
rubygems_version: 3.0.6
|
504
503
|
signing_key:
|
505
504
|
specification_version: 4
|
506
505
|
summary: Code smell detector for Ruby
|