reek 5.3.0 → 5.3.1
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 +4 -0
- data/Gemfile +12 -12
- 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/features/support/env.rb +2 -2
- data/lib/reek/ast/sexp_extensions.rb +0 -2
- data/lib/reek/ast/sexp_extensions/yield.rb +0 -4
- data/lib/reek/spec.rb +2 -8
- data/lib/reek/version.rb +1 -1
- data/reek.gemspec +1 -1
- metadata +10 -11
- data/lib/reek/ast/sexp_extensions/attribute_assignments.rb +0 -14
- data/lib/reek/ast/sexp_extensions/literal.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db4147666bde8bb5b529a24811652b2962207c644f391bef9dd134091490ae44
|
4
|
+
data.tar.gz: 1bc45d794c8c4a678801a612e533c2f1fff5a490ccc3e0e60013b95ff6a387f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7dddc4d7211d87887bbb3d639d499a9eb4730f1915c88793fe591f67332a549dcb88fa678bc4acd50bc6e05c8183eede890b03b6e000c036825c58e10f14b2e
|
7
|
+
data.tar.gz: 49ebed1b359d43a42e843dc5e994c62c7d9ca7a9e3b0cb8640bd345664c8d8d094b7c42a14efea81280a3575c9f9f2b25b22ecceece76b09cfcc40589de7fc18
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -5,18 +5,18 @@ gemspec
|
|
5
5
|
ruby RUBY_VERSION
|
6
6
|
|
7
7
|
group :development do
|
8
|
-
gem '
|
9
|
-
gem '
|
10
|
-
gem '
|
11
|
-
gem '
|
12
|
-
gem 'kramdown',
|
13
|
-
gem 'rake',
|
14
|
-
gem 'rspec',
|
15
|
-
gem 'rspec-benchmark',
|
16
|
-
gem 'rubocop',
|
17
|
-
gem 'rubocop-rspec',
|
18
|
-
gem 'simplecov',
|
19
|
-
gem 'yard',
|
8
|
+
gem 'aruba', '~> 0.14.8'
|
9
|
+
gem 'cucumber', '~> 3.0'
|
10
|
+
gem 'factory_bot', '~> 5.0'
|
11
|
+
gem 'kramdown', '~> 2.1'
|
12
|
+
gem 'kramdown-parser-gfm', '~> 1.0'
|
13
|
+
gem 'rake', '~> 12.0'
|
14
|
+
gem 'rspec', '~> 3.0'
|
15
|
+
gem 'rspec-benchmark', '~> 0.4.0'
|
16
|
+
gem 'rubocop', '~> 0.63.0'
|
17
|
+
gem 'rubocop-rspec', '~> 1.32.0'
|
18
|
+
gem 'simplecov', '~> 0.16.1'
|
19
|
+
gem 'yard', '~> 0.9.5'
|
20
20
|
|
21
21
|
platforms :mri do
|
22
22
|
gem 'redcarpet', '~> 3.4.0'
|
@@ -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.3.
|
46
|
+
Check out https://github.com/troessner/reek/blob/v5.3.1/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.3.
|
123
|
+
Check out https://github.com/troessner/reek/blob/v5.3.1/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.3.
|
27
|
+
"documentation_link": "https://github.com/troessner/reek/blob/v5.3.1/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.3.
|
36
|
+
"documentation_link": "https://github.com/troessner/reek/blob/v5.3.1/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.3.
|
56
|
+
"documentation_link": "https://github.com/troessner/reek/blob/v5.3.1/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.3.
|
186
|
-
[5]:UncommunicativeVariableName: Smelly#x has the variable name 'y' [https://github.com/troessner/reek/blob/v5.3.
|
185
|
+
[4]:UncommunicativeMethodName: Smelly#x has the name 'x' [https://github.com/troessner/reek/blob/v5.3.1/docs/Uncommunicative-Method-Name.md]
|
186
|
+
[5]:UncommunicativeVariableName: Smelly#x has the variable name 'y' [https://github.com/troessner/reek/blob/v5.3.1/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.3.
|
213
|
-
UncommunicativeVariableName: Smelly#x has the variable name 'y' [https://github.com/troessner/reek/blob/v5.3.
|
212
|
+
UncommunicativeMethodName: Smelly#x has the name 'x' [https://github.com/troessner/reek/blob/v5.3.1/docs/Uncommunicative-Method-Name.md]
|
213
|
+
UncommunicativeVariableName: Smelly#x has the variable name 'y' [https://github.com/troessner/reek/blob/v5.3.1/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.3.
|
28
|
+
documentation_link: https://github.com/troessner/reek/blob/v5.3.1/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.3.
|
36
|
+
documentation_link: https://github.com/troessner/reek/blob/v5.3.1/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.3.
|
51
|
+
documentation_link: https://github.com/troessner/reek/blob/v5.3.1/docs/Irresponsible-Module.md
|
52
52
|
"""
|
data/features/support/env.rb
CHANGED
@@ -13,11 +13,11 @@ end
|
|
13
13
|
#
|
14
14
|
class ReekWorld
|
15
15
|
def reek(args)
|
16
|
-
|
16
|
+
run_command_and_stop("reek --no-color --no-documentation #{args}", fail_on_error: false)
|
17
17
|
end
|
18
18
|
|
19
19
|
def reek_with_pipe(stdin, args)
|
20
|
-
|
20
|
+
run_command "reek --no-color --no-documentation #{args}"
|
21
21
|
type(stdin)
|
22
22
|
close_input
|
23
23
|
end
|
@@ -3,14 +3,12 @@
|
|
3
3
|
require_relative 'reference_collector'
|
4
4
|
|
5
5
|
require_relative 'sexp_extensions/arguments'
|
6
|
-
require_relative 'sexp_extensions/attribute_assignments'
|
7
6
|
require_relative 'sexp_extensions/begin'
|
8
7
|
require_relative 'sexp_extensions/block'
|
9
8
|
require_relative 'sexp_extensions/case'
|
10
9
|
require_relative 'sexp_extensions/constant'
|
11
10
|
require_relative 'sexp_extensions/if'
|
12
11
|
require_relative 'sexp_extensions/lambda'
|
13
|
-
require_relative 'sexp_extensions/literal'
|
14
12
|
require_relative 'sexp_extensions/logical_operators'
|
15
13
|
require_relative 'sexp_extensions/methods'
|
16
14
|
require_relative 'sexp_extensions/module'
|
data/lib/reek/spec.rb
CHANGED
@@ -6,10 +6,10 @@ require_relative 'spec/should_reek_only_of'
|
|
6
6
|
|
7
7
|
module Reek
|
8
8
|
#
|
9
|
-
# Provides matchers for
|
9
|
+
# Provides matchers for RSpec, making it easy to check code quality.
|
10
10
|
#
|
11
11
|
# If you require this module somewhere within your spec (or in your spec_helper),
|
12
|
-
# Reek will arrange to update
|
12
|
+
# Reek will arrange to update RSpec::Runner's config so that it knows about the
|
13
13
|
# matchers defined here.
|
14
14
|
#
|
15
15
|
# === Examples
|
@@ -120,12 +120,6 @@ module Reek
|
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
|
-
if Object.const_defined?(:Spec)
|
124
|
-
Spec::Runner.configure do |config|
|
125
|
-
config.include(Reek::Spec)
|
126
|
-
end
|
127
|
-
end
|
128
|
-
|
129
123
|
if Object.const_defined?(:RSpec)
|
130
124
|
RSpec.configure do |config|
|
131
125
|
config.include(Reek::Spec)
|
data/lib/reek/version.rb
CHANGED
data/reek.gemspec
CHANGED
@@ -21,7 +21,7 @@ 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.
|
24
|
+
s.add_runtime_dependency 'parser', '< 2.7', '>= 2.5.0.0', '!= 2.5.1.1'
|
25
25
|
s.add_runtime_dependency 'psych', '~> 3.1.0'
|
26
26
|
s.add_runtime_dependency 'rainbow', '>= 2.0', '< 4.0'
|
27
27
|
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.3.
|
4
|
+
version: 5.3.1
|
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:
|
14
|
+
date: 2019-02-08 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'
|
48
51
|
- - ">="
|
49
52
|
- !ruby/object:Gem::Version
|
50
53
|
version: 2.5.0.0
|
51
54
|
- - "!="
|
52
55
|
- !ruby/object:Gem::Version
|
53
56
|
version: 2.5.1.1
|
54
|
-
- - "<"
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: '2.6'
|
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'
|
61
64
|
- - ">="
|
62
65
|
- !ruby/object:Gem::Version
|
63
66
|
version: 2.5.0.0
|
64
67
|
- - "!="
|
65
68
|
- !ruby/object:Gem::Version
|
66
69
|
version: 2.5.1.1
|
67
|
-
- - "<"
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '2.6'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: psych
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -224,14 +224,12 @@ files:
|
|
224
224
|
- lib/reek/ast/reference_collector.rb
|
225
225
|
- lib/reek/ast/sexp_extensions.rb
|
226
226
|
- lib/reek/ast/sexp_extensions/arguments.rb
|
227
|
-
- lib/reek/ast/sexp_extensions/attribute_assignments.rb
|
228
227
|
- lib/reek/ast/sexp_extensions/begin.rb
|
229
228
|
- lib/reek/ast/sexp_extensions/block.rb
|
230
229
|
- lib/reek/ast/sexp_extensions/case.rb
|
231
230
|
- lib/reek/ast/sexp_extensions/constant.rb
|
232
231
|
- lib/reek/ast/sexp_extensions/if.rb
|
233
232
|
- lib/reek/ast/sexp_extensions/lambda.rb
|
234
|
-
- lib/reek/ast/sexp_extensions/literal.rb
|
235
233
|
- lib/reek/ast/sexp_extensions/logical_operators.rb
|
236
234
|
- lib/reek/ast/sexp_extensions/methods.rb
|
237
235
|
- lib/reek/ast/sexp_extensions/module.rb
|
@@ -501,7 +499,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
501
499
|
- !ruby/object:Gem::Version
|
502
500
|
version: '0'
|
503
501
|
requirements: []
|
504
|
-
|
502
|
+
rubyforge_project:
|
503
|
+
rubygems_version: 2.7.7
|
505
504
|
signing_key:
|
506
505
|
specification_version: 4
|
507
506
|
summary: Code smell detector for Ruby
|