reek 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +7 -0
- data/features/command_line_interface/options.feature +2 -1
- data/features/command_line_interface/smells_count.feature +17 -17
- data/features/command_line_interface/stdin.feature +3 -3
- data/features/configuration_files/masking_smells.feature +30 -30
- data/features/configuration_files/overrides_defaults.feature +14 -0
- data/features/rake_task/rake_task.feature +12 -12
- data/features/reports/reports.feature +66 -19
- data/features/ruby_api/api.feature +10 -10
- data/features/samples.feature +13 -3
- data/lib/reek/cli/command_line.rb +6 -3
- data/lib/reek/cli/report.rb +6 -0
- data/lib/reek/core/smell_configuration.rb +2 -2
- data/lib/reek/smells/smell_detector.rb +1 -1
- data/lib/reek/source/source_locator.rb +1 -1
- data/lib/reek/source/tree_dresser.rb +4 -3
- data/lib/reek/version.rb +1 -1
- data/reek.gemspec +1 -1
- data/spec/reek/core/smell_configuration_spec.rb +36 -0
- data/spec/samples/overrides_defaults/camel_case.rb +14 -0
- data/spec/samples/overrides_defaults/config.reek +6 -0
- data/spec/samples/ruby20_syntax.rb +17 -0
- metadata +137 -139
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a55c84d8e8f1583544ec71d2eee88e6009bec7de
|
4
|
+
data.tar.gz: 2293dce903da468f25b4bfb491fe1b60f5e13721
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0083106eb1f3aac9ec626273072670c551c09f42d9624e2497120e9099243c5e8154a90d575b7a9dd0b7505de0787dd4c21218d03702e23dc8dcc904b9553d8
|
7
|
+
data.tar.gz: dc91d3a860e07b2b1edb7c153df02c5e263c145209cf6c577f31cf091eb28da42f489a59a8193de593a98421926f44cf40fb3592bcec5d41afe06f6c73cdd7e5
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
== 1.3.4
|
2
|
+
|
3
|
+
* (apiology) Add --single-line option for reporting
|
4
|
+
* (gilles-leblanc) Allow config files to override default config values
|
5
|
+
* (gilles-leblanc) Added line numbers by default when you run the reek command
|
6
|
+
* (mvz) Support Ruby 2.0 syntax
|
7
|
+
|
1
8
|
== 1.3.3
|
2
9
|
|
3
10
|
* (bf4) Loosen ruby_parser version dependency
|
@@ -39,7 +39,8 @@ Feature: Reek can be controlled using command-line options
|
|
39
39
|
|
40
40
|
Report formatting:
|
41
41
|
-q, --[no-]quiet Suppress headings for smell-free source files
|
42
|
-
-n, --line-number
|
42
|
+
-n, --line-number Suppress line number(s) from the output.
|
43
|
+
-s, --single-line Show IDE-compatible single-line-per-warning
|
43
44
|
-y, --yaml Report smells in YAML format
|
44
45
|
|
45
46
|
"""
|
@@ -9,11 +9,11 @@ Feature: Reports total number of code smells
|
|
9
9
|
And it reports:
|
10
10
|
"""
|
11
11
|
spec/samples/not_quite_masked/dirty.rb -- 5 warnings:
|
12
|
-
Dirty has the variable name '@s' (UncommunicativeVariableName)
|
13
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
14
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
15
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
16
|
-
Dirty#a has the name 'a' (UncommunicativeMethodName)
|
12
|
+
[7]:Dirty has the variable name '@s' (UncommunicativeVariableName)
|
13
|
+
[6, 8]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
14
|
+
[6, 8]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
15
|
+
[7]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
16
|
+
[5]:Dirty#a has the name 'a' (UncommunicativeMethodName)
|
17
17
|
"""
|
18
18
|
|
19
19
|
Scenario: Output total number of smells when inspecting multiple files
|
@@ -22,19 +22,19 @@ Feature: Reports total number of code smells
|
|
22
22
|
And it reports:
|
23
23
|
"""
|
24
24
|
spec/samples/two_smelly_files/dirty_one.rb -- 6 warnings:
|
25
|
-
Dirty has the variable name '@s' (UncommunicativeVariableName)
|
26
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
27
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
28
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
29
|
-
Dirty#a has the name 'a' (UncommunicativeMethodName)
|
30
|
-
Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
25
|
+
[5]:Dirty has the variable name '@s' (UncommunicativeVariableName)
|
26
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
27
|
+
[4, 6]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
28
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
29
|
+
[3]:Dirty#a has the name 'a' (UncommunicativeMethodName)
|
30
|
+
[5]:Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
31
31
|
spec/samples/two_smelly_files/dirty_two.rb -- 6 warnings:
|
32
|
-
Dirty has the variable name '@s' (UncommunicativeVariableName)
|
33
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
34
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
35
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
36
|
-
Dirty#a has the name 'a' (UncommunicativeMethodName)
|
37
|
-
Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
32
|
+
[5]:Dirty has the variable name '@s' (UncommunicativeVariableName)
|
33
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
34
|
+
[4, 6]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
35
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
36
|
+
[3]:Dirty#a has the name 'a' (UncommunicativeMethodName)
|
37
|
+
[5]:Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
38
38
|
12 total warnings
|
39
39
|
"""
|
40
40
|
|
@@ -33,9 +33,9 @@ Feature: Reek reads from $stdin when no files are given
|
|
33
33
|
And it reports:
|
34
34
|
"""
|
35
35
|
$stdin -- 3 warnings:
|
36
|
-
Turn has no descriptive comment (IrresponsibleModule)
|
37
|
-
Turn has the variable name '@x' (UncommunicativeVariableName)
|
38
|
-
Turn#y has the name 'y' (UncommunicativeMethodName)
|
36
|
+
[1]:Turn has no descriptive comment (IrresponsibleModule)
|
37
|
+
[1]:Turn has the variable name '@x' (UncommunicativeVariableName)
|
38
|
+
[1]:Turn#y has the name 'y' (UncommunicativeMethodName)
|
39
39
|
|
40
40
|
"""
|
41
41
|
|
@@ -10,12 +10,12 @@ Feature: Masking smells using config files
|
|
10
10
|
And it reports:
|
11
11
|
"""
|
12
12
|
spec/samples/empty_config_file/dirty.rb -- 6 warnings:
|
13
|
-
Dirty has the variable name '@s' (UncommunicativeVariableName)
|
14
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
15
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
16
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
17
|
-
Dirty#a has the name 'a' (UncommunicativeMethodName)
|
18
|
-
Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
13
|
+
[5]:Dirty has the variable name '@s' (UncommunicativeVariableName)
|
14
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
15
|
+
[4, 6]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
16
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
17
|
+
[3]:Dirty#a has the name 'a' (UncommunicativeMethodName)
|
18
|
+
[5]:Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
19
19
|
"""
|
20
20
|
|
21
21
|
Scenario: corrupt config file prevents normal output
|
@@ -24,13 +24,13 @@ Feature: Masking smells using config files
|
|
24
24
|
And it reports:
|
25
25
|
"""
|
26
26
|
spec/samples/corrupt_config_file/dirty.rb -- 7 warnings:
|
27
|
-
Dirty has no descriptive comment (IrresponsibleModule)
|
28
|
-
Dirty has the variable name '@s' (UncommunicativeVariableName)
|
29
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
30
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
31
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
32
|
-
Dirty#a has the name 'a' (UncommunicativeMethodName)
|
33
|
-
Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
27
|
+
[1]:Dirty has no descriptive comment (IrresponsibleModule)
|
28
|
+
[4]:Dirty has the variable name '@s' (UncommunicativeVariableName)
|
29
|
+
[3, 5]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
30
|
+
[3, 5]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
31
|
+
[4]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
32
|
+
[2]:Dirty#a has the name 'a' (UncommunicativeMethodName)
|
33
|
+
[4]:Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
34
34
|
"""
|
35
35
|
And it reports an error
|
36
36
|
|
@@ -40,9 +40,9 @@ Feature: Masking smells using config files
|
|
40
40
|
And it reports:
|
41
41
|
"""
|
42
42
|
spec/samples/masked/dirty.rb -- 3 warnings:
|
43
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
44
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
45
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
43
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
44
|
+
[4, 6]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
45
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
46
46
|
"""
|
47
47
|
And it reports the error "Error: No such file - no_such_file.rb"
|
48
48
|
|
@@ -52,9 +52,9 @@ Feature: Masking smells using config files
|
|
52
52
|
And it reports:
|
53
53
|
"""
|
54
54
|
spec/samples/masked/dirty.rb -- 3 warnings:
|
55
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
56
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
57
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
55
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
56
|
+
[4, 6]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
57
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
58
58
|
"""
|
59
59
|
|
60
60
|
Scenario: non-masked smells are only counted once
|
@@ -63,11 +63,11 @@ Feature: Masking smells using config files
|
|
63
63
|
And it reports:
|
64
64
|
"""
|
65
65
|
spec/samples/not_quite_masked/dirty.rb -- 5 warnings:
|
66
|
-
Dirty has the variable name '@s' (UncommunicativeVariableName)
|
67
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
68
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
69
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
70
|
-
Dirty#a has the name 'a' (UncommunicativeMethodName)
|
66
|
+
[7]:Dirty has the variable name '@s' (UncommunicativeVariableName)
|
67
|
+
[6, 8]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
68
|
+
[6, 8]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
69
|
+
[7]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
70
|
+
[5]:Dirty#a has the name 'a' (UncommunicativeMethodName)
|
71
71
|
"""
|
72
72
|
|
73
73
|
@overrides
|
@@ -77,8 +77,8 @@ Feature: Masking smells using config files
|
|
77
77
|
And it reports:
|
78
78
|
"""
|
79
79
|
spec/samples/overrides/masked/dirty.rb -- 2 warnings:
|
80
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
81
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
80
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
81
|
+
[4, 6]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
82
82
|
"""
|
83
83
|
|
84
84
|
Scenario: allow masking some calls for duplication smell
|
@@ -87,8 +87,8 @@ Feature: Masking smells using config files
|
|
87
87
|
And it reports:
|
88
88
|
"""
|
89
89
|
spec/samples/mask_some/dirty.rb -- 2 warnings:
|
90
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
91
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
90
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
91
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
92
92
|
"""
|
93
93
|
|
94
94
|
@comments
|
@@ -98,7 +98,7 @@ Feature: Masking smells using config files
|
|
98
98
|
And it reports:
|
99
99
|
"""
|
100
100
|
spec/samples/inline_config/dirty.rb -- 1 warning:
|
101
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
101
|
+
[5, 7]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
102
102
|
"""
|
103
103
|
|
104
104
|
Scenario: supports a config file
|
@@ -107,7 +107,7 @@ Feature: Masking smells using config files
|
|
107
107
|
And it reports:
|
108
108
|
"""
|
109
109
|
spec/samples/masked/dirty.rb -- 1 warning:
|
110
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
110
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
111
111
|
"""
|
112
112
|
|
113
113
|
Scenario: supports multiple config files
|
@@ -0,0 +1,14 @@
|
|
1
|
+
@overrides_defaults
|
2
|
+
Feature: Overriding current rules by specifying new configuration values
|
3
|
+
In order to customize Reek to suit my needs
|
4
|
+
As a developer
|
5
|
+
I want to be able to override the default configuration values
|
6
|
+
|
7
|
+
Scenario: List of configuration values is overridden by a lower config file
|
8
|
+
When I run reek spec/samples/overrides_defaults/camel_case.rb
|
9
|
+
Then the exit status indicates smells
|
10
|
+
And it reports:
|
11
|
+
"""
|
12
|
+
spec/samples/overrides_defaults/camel_case.rb -- 1 warning:
|
13
|
+
[9]:CamelCase#initialize has the variable name 'x1' (UncommunicativeVariableName)
|
14
|
+
"""
|
@@ -14,9 +14,9 @@ Feature: Reek can be driven through its Task
|
|
14
14
|
And it reports:
|
15
15
|
"""
|
16
16
|
spec/samples/masked/dirty.rb -- 3 warnings:
|
17
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
18
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
19
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
17
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
18
|
+
[4, 6]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
19
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
20
20
|
"""
|
21
21
|
|
22
22
|
Scenario: name changes the task name
|
@@ -30,9 +30,9 @@ Feature: Reek can be driven through its Task
|
|
30
30
|
And it reports:
|
31
31
|
"""
|
32
32
|
spec/samples/masked/dirty.rb -- 3 warnings:
|
33
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
34
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
35
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
33
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
34
|
+
[4, 6]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
35
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
36
36
|
"""
|
37
37
|
|
38
38
|
Scenario: verbose prints the reek command
|
@@ -58,12 +58,12 @@ Feature: Reek can be driven through its Task
|
|
58
58
|
And it reports:
|
59
59
|
"""
|
60
60
|
spec/samples/empty_config_file/dirty.rb -- 6 warnings:
|
61
|
-
Dirty has the variable name '@s' (UncommunicativeVariableName)
|
62
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
63
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
64
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
65
|
-
Dirty#a has the name 'a' (UncommunicativeMethodName)
|
66
|
-
Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
61
|
+
[5]:Dirty has the variable name '@s' (UncommunicativeVariableName)
|
62
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
63
|
+
[4, 6]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
64
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
65
|
+
[3]:Dirty#a has the name 'a' (UncommunicativeMethodName)
|
66
|
+
[5]:Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
67
67
|
"""
|
68
68
|
|
69
69
|
Scenario: can be configured with config_files
|
@@ -10,19 +10,19 @@ Feature: Correctly formatted reports
|
|
10
10
|
And it reports:
|
11
11
|
"""
|
12
12
|
spec/samples/two_smelly_files/dirty_one.rb -- 6 warnings:
|
13
|
-
Dirty has the variable name '@s' (UncommunicativeVariableName)
|
14
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
15
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
16
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
17
|
-
Dirty#a has the name 'a' (UncommunicativeMethodName)
|
18
|
-
Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
13
|
+
[5]:Dirty has the variable name '@s' (UncommunicativeVariableName)
|
14
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
15
|
+
[4, 6]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
16
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
17
|
+
[3]:Dirty#a has the name 'a' (UncommunicativeMethodName)
|
18
|
+
[5]:Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
19
19
|
spec/samples/two_smelly_files/dirty_two.rb -- 6 warnings:
|
20
|
-
Dirty has the variable name '@s' (UncommunicativeVariableName)
|
21
|
-
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
22
|
-
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
23
|
-
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
24
|
-
Dirty#a has the name 'a' (UncommunicativeMethodName)
|
25
|
-
Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
20
|
+
[5]:Dirty has the variable name '@s' (UncommunicativeVariableName)
|
21
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
22
|
+
[4, 6]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
23
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
24
|
+
[3]:Dirty#a has the name 'a' (UncommunicativeMethodName)
|
25
|
+
[5]:Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
26
26
|
12 total warnings
|
27
27
|
"""
|
28
28
|
|
@@ -50,7 +50,7 @@ Feature: Correctly formatted reports
|
|
50
50
|
Scenario Outline: --quiet turns off headers for fragrant files
|
51
51
|
When I run reek <option> spec/samples/three_clean_files/*.rb
|
52
52
|
Then it succeeds
|
53
|
-
And it reports:
|
53
|
+
And it reports:
|
54
54
|
"""
|
55
55
|
0 total warnings
|
56
56
|
"""
|
@@ -62,17 +62,17 @@ Feature: Correctly formatted reports
|
|
62
62
|
| -n -q |
|
63
63
|
| -q -n |
|
64
64
|
|
65
|
-
Scenario Outline: --line-number turns
|
65
|
+
Scenario Outline: --line-number turns off line numbers
|
66
66
|
When I run reek <option> spec/samples/not_quite_masked/dirty.rb
|
67
67
|
Then the exit status indicates smells
|
68
68
|
And it reports:
|
69
69
|
"""
|
70
70
|
spec/samples/not_quite_masked/dirty.rb -- 5 warnings:
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
71
|
+
Dirty has the variable name '@s' (UncommunicativeVariableName)
|
72
|
+
Dirty#a calls @s.title twice (DuplicateMethodCall)
|
73
|
+
Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
74
|
+
Dirty#a contains iterators nested 2 deep (NestedIterators)
|
75
|
+
Dirty#a has the name 'a' (UncommunicativeMethodName)
|
76
76
|
"""
|
77
77
|
|
78
78
|
Examples:
|
@@ -81,3 +81,50 @@ Feature: Correctly formatted reports
|
|
81
81
|
| --line-number |
|
82
82
|
| -n -q |
|
83
83
|
| -q -n |
|
84
|
+
|
85
|
+
Scenario Outline: --single-line shows filename and one line number
|
86
|
+
When I run reek <option> spec/samples/not_quite_masked/dirty.rb
|
87
|
+
Then the exit status indicates smells
|
88
|
+
And it reports:
|
89
|
+
"""
|
90
|
+
spec/samples/not_quite_masked/dirty.rb -- 5 warnings:
|
91
|
+
spec/samples/not_quite_masked/dirty.rb:7: Dirty has the variable name '@s' (UncommunicativeVariableName)
|
92
|
+
spec/samples/not_quite_masked/dirty.rb:6: Dirty#a calls @s.title twice (DuplicateMethodCall)
|
93
|
+
spec/samples/not_quite_masked/dirty.rb:6: Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
94
|
+
spec/samples/not_quite_masked/dirty.rb:7: Dirty#a contains iterators nested 2 deep (NestedIterators)
|
95
|
+
spec/samples/not_quite_masked/dirty.rb:5: Dirty#a has the name 'a' (UncommunicativeMethodName)
|
96
|
+
"""
|
97
|
+
|
98
|
+
Examples:
|
99
|
+
| option |
|
100
|
+
| -s |
|
101
|
+
| --single-line |
|
102
|
+
| -s -q |
|
103
|
+
| -q -s |
|
104
|
+
|
105
|
+
Scenario Outline: Extra slashes aren't added to directory names
|
106
|
+
When I run reek <args>
|
107
|
+
Then the exit status indicates smells
|
108
|
+
And it reports:
|
109
|
+
"""
|
110
|
+
spec/samples/two_smelly_files/dirty_one.rb -- 6 warnings:
|
111
|
+
[5]:Dirty has the variable name '@s' (UncommunicativeVariableName)
|
112
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
113
|
+
[4, 6]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
114
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
115
|
+
[3]:Dirty#a has the name 'a' (UncommunicativeMethodName)
|
116
|
+
[5]:Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
117
|
+
spec/samples/two_smelly_files/dirty_two.rb -- 6 warnings:
|
118
|
+
[5]:Dirty has the variable name '@s' (UncommunicativeVariableName)
|
119
|
+
[4, 6]:Dirty#a calls @s.title twice (DuplicateMethodCall)
|
120
|
+
[4, 6]:Dirty#a calls puts(@s.title) twice (DuplicateMethodCall)
|
121
|
+
[5]:Dirty#a contains iterators nested 2 deep (NestedIterators)
|
122
|
+
[3]:Dirty#a has the name 'a' (UncommunicativeMethodName)
|
123
|
+
[5]:Dirty#a has the variable name 'x' (UncommunicativeVariableName)
|
124
|
+
12 total warnings
|
125
|
+
"""
|
126
|
+
|
127
|
+
Examples:
|
128
|
+
| args |
|
129
|
+
| spec/samples/two_smelly_files/ |
|
130
|
+
| spec/samples/two_smelly_files |
|
@@ -10,14 +10,14 @@ Feature: The Reek API maintains backwards compatibility
|
|
10
10
|
And it reports:
|
11
11
|
"""
|
12
12
|
spec/samples/demo/demo.rb -- 10 warnings:
|
13
|
-
Dirty has no descriptive comment (IrresponsibleModule)
|
14
|
-
Dirty#awful has 4 parameters (LongParameterList)
|
15
|
-
Dirty#awful has boolean parameter 'log' (BooleanParameter)
|
16
|
-
Dirty#awful has the parameter name 'x' (UncommunicativeParameterName)
|
17
|
-
Dirty#awful has the parameter name 'y' (UncommunicativeParameterName)
|
18
|
-
Dirty#awful has the variable name 'w' (UncommunicativeVariableName)
|
19
|
-
Dirty#awful has unused parameter 'log' (UnusedParameters)
|
20
|
-
Dirty#awful has unused parameter 'offset' (UnusedParameters)
|
21
|
-
Dirty#awful has unused parameter 'x' (UnusedParameters)
|
22
|
-
Dirty#awful has unused parameter 'y' (UnusedParameters)
|
13
|
+
[1]:Dirty has no descriptive comment (IrresponsibleModule)
|
14
|
+
[3]:Dirty#awful has 4 parameters (LongParameterList)
|
15
|
+
[3]:Dirty#awful has boolean parameter 'log' (BooleanParameter)
|
16
|
+
[3]:Dirty#awful has the parameter name 'x' (UncommunicativeParameterName)
|
17
|
+
[3]:Dirty#awful has the parameter name 'y' (UncommunicativeParameterName)
|
18
|
+
[5]:Dirty#awful has the variable name 'w' (UncommunicativeVariableName)
|
19
|
+
[3]:Dirty#awful has unused parameter 'log' (UnusedParameters)
|
20
|
+
[3]:Dirty#awful has unused parameter 'offset' (UnusedParameters)
|
21
|
+
[3]:Dirty#awful has unused parameter 'x' (UnusedParameters)
|
22
|
+
[3]:Dirty#awful has unused parameter 'y' (UnusedParameters)
|
23
23
|
"""
|
data/features/samples.feature
CHANGED
@@ -6,7 +6,7 @@ Feature: Basic smell detection
|
|
6
6
|
|
7
7
|
@inline
|
8
8
|
Scenario: Correct smells from inline.rb
|
9
|
-
When I run reek spec/samples/inline.rb
|
9
|
+
When I run reek -n spec/samples/inline.rb
|
10
10
|
Then the exit status indicates smells
|
11
11
|
And it reports:
|
12
12
|
"""
|
@@ -54,7 +54,7 @@ Feature: Basic smell detection
|
|
54
54
|
"""
|
55
55
|
|
56
56
|
Scenario: Correct smells from optparse.rb
|
57
|
-
When I run reek spec/samples/optparse.rb
|
57
|
+
When I run reek -n spec/samples/optparse.rb
|
58
58
|
Then the exit status indicates smells
|
59
59
|
And it reports:
|
60
60
|
"""
|
@@ -171,7 +171,7 @@ Feature: Basic smell detection
|
|
171
171
|
"""
|
172
172
|
|
173
173
|
Scenario: Correct smells from redcloth.rb
|
174
|
-
When I run reek spec/samples/redcloth.rb
|
174
|
+
When I run reek -n spec/samples/redcloth.rb
|
175
175
|
Then the exit status indicates smells
|
176
176
|
And it reports:
|
177
177
|
"""
|
@@ -278,3 +278,13 @@ Feature: Basic smell detection
|
|
278
278
|
RedCloth#textile_popup_help has the parameter name 'windowW' (UncommunicativeParameterName)
|
279
279
|
RedCloth#to_html has approx 24 statements (TooManyStatements)
|
280
280
|
"""
|
281
|
+
|
282
|
+
Scenario: Correct smells from a source file with Ruby 2.0 specific syntax
|
283
|
+
When I run reek spec/samples/ruby20_syntax.rb
|
284
|
+
Then the exit status indicates smells
|
285
|
+
And it reports:
|
286
|
+
"""
|
287
|
+
spec/samples/ruby20_syntax.rb -- 2 warnings:
|
288
|
+
[1]:SomeClass has no descriptive comment (IrresponsibleModule)
|
289
|
+
[2]:SomeClass#method_with_keyword_arguments has unused parameter 'foo' (UnusedParameters)
|
290
|
+
"""
|
@@ -18,7 +18,7 @@ module Reek
|
|
18
18
|
@argv = argv
|
19
19
|
@parser = OptionParser.new
|
20
20
|
@report_class = VerboseReport
|
21
|
-
@warning_formatter =
|
21
|
+
@warning_formatter = WarningFormatterWithLineNumbers
|
22
22
|
@command_class = ReekCommand
|
23
23
|
@config_files = []
|
24
24
|
set_options
|
@@ -75,9 +75,12 @@ EOB
|
|
75
75
|
@parser.on("-q", "--[no-]quiet", "Suppress headings for smell-free source files") do |opt|
|
76
76
|
@report_class = opt ? QuietReport : VerboseReport
|
77
77
|
end
|
78
|
-
@parser.on("-n", "--line-number", "
|
79
|
-
@warning_formatter =
|
78
|
+
@parser.on("-n", "--line-number", "Suppress line number(s) from the output.") do
|
79
|
+
@warning_formatter = SimpleWarningFormatter
|
80
80
|
end
|
81
|
+
@parser.on("-s", "--single-line", "Show IDE-compatible single-line-per-warning") do
|
82
|
+
@warning_formatter = SingleLineWarningFormatter
|
83
|
+
end
|
81
84
|
@parser.on("-y", "--yaml", "Report smells in YAML format") do
|
82
85
|
@command_class = YamlCommand
|
83
86
|
# SMELL: the args passed to the command should be tested, because it may
|
data/lib/reek/cli/report.rb
CHANGED
@@ -27,6 +27,12 @@ module Reek
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
+
module SingleLineWarningFormatter
|
31
|
+
def self.format(warning)
|
32
|
+
"#{warning.source}:#{warning.lines.first}: #{SimpleWarningFormatter.format(warning)}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
30
36
|
#
|
31
37
|
# A report that lists every source, including those that have no smells.
|
32
38
|
#
|
@@ -18,7 +18,7 @@ module Reek
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def is_language_node?
|
21
|
-
|
21
|
+
Symbol === first
|
22
22
|
end
|
23
23
|
|
24
24
|
def has_type?(type)
|
@@ -48,12 +48,13 @@ module Reek
|
|
48
48
|
end
|
49
49
|
blk.call(self) if first == target_type
|
50
50
|
end
|
51
|
+
|
51
52
|
def format_ruby
|
52
|
-
return self[0].to_s unless Array === self
|
53
53
|
Ruby2Ruby.new.process(deep_copy)
|
54
54
|
end
|
55
|
+
|
55
56
|
def deep_copy
|
56
|
-
Sexp.
|
57
|
+
Sexp.new(*map { |elem| Sexp === elem ? elem.deep_copy : elem })
|
57
58
|
end
|
58
59
|
end
|
59
60
|
|
data/lib/reek/version.rb
CHANGED
data/reek.gemspec
CHANGED
@@ -26,7 +26,7 @@ and reports any code smells it finds.
|
|
26
26
|
s.rubygems_version = %q{1.3.6}
|
27
27
|
s.summary = %q{Code smell detector for Ruby}
|
28
28
|
|
29
|
-
s.add_runtime_dependency(%q<ruby_parser>, ["
|
29
|
+
s.add_runtime_dependency(%q<ruby_parser>, ["~> 3.2"])
|
30
30
|
s.add_runtime_dependency(%q<sexp_processor>)
|
31
31
|
s.add_runtime_dependency(%q<ruby2ruby>, ["~> 2.0.2"])
|
32
32
|
|
@@ -8,4 +8,40 @@ describe SmellConfiguration do
|
|
8
8
|
cf = SmellConfiguration.new({})
|
9
9
|
cf.value('fred', nil, 27).should == 27
|
10
10
|
end
|
11
|
+
|
12
|
+
context 'when overriding default configs' do
|
13
|
+
before(:each) do
|
14
|
+
@base_config = {"enabled"=>true, "exclude"=>[],
|
15
|
+
"reject"=>[/^.$/, /[0-9]$/, /[A-Z]/],
|
16
|
+
"accept"=>["_"]}
|
17
|
+
@smell_config = SmellConfiguration.new(@base_config)
|
18
|
+
end
|
19
|
+
|
20
|
+
it { @smell_config.merge!({}).should == @base_config }
|
21
|
+
it { @smell_config.merge!({"enabled"=>true}).should == @base_config }
|
22
|
+
it { @smell_config.merge!({"exclude"=>[]}).should == @base_config }
|
23
|
+
it { @smell_config.merge!({"accept"=>["_"]}).should == @base_config }
|
24
|
+
it { @smell_config.merge!({"reject"=>[/^.$/, /[0-9]$/, /[A-Z]/]}).should == @base_config }
|
25
|
+
it { @smell_config.merge!({"enabled"=>true, "accept"=>["_"]}).should == @base_config }
|
26
|
+
|
27
|
+
it 'should override single values' do
|
28
|
+
@smell_config.merge!({"enabled"=>false}).should == {"enabled"=>false, "exclude"=>[],
|
29
|
+
"reject"=>[/^.$/, /[0-9]$/, /[A-Z]/],
|
30
|
+
"accept"=>["_"]}
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'should override arrays of values' do
|
34
|
+
@smell_config.merge!({"reject"=>[/^.$/, /[3-9]$/]}).should == {"enabled"=>true,
|
35
|
+
"exclude"=>[],
|
36
|
+
"reject"=>[/^.$/, /[3-9]$/],
|
37
|
+
"accept"=>["_"]}
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'should override multiple values' do
|
41
|
+
@smell_config.merge!({"enabled"=>false, "accept"=>[/[A-Z]$/]}).should ==
|
42
|
+
{"enabled"=>false, "exclude"=>[],
|
43
|
+
"reject"=>[/^.$/, /[0-9]$/, /[A-Z]/],
|
44
|
+
"accept"=>[/[A-Z]$/]}
|
45
|
+
end
|
46
|
+
end
|
11
47
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Class containing camelCase variable which would normally smell
|
2
|
+
class CamelCase
|
3
|
+
def initialize
|
4
|
+
# These next two would normally smell if it weren't for overridden config values
|
5
|
+
camelCaseVariable = []
|
6
|
+
anotherOne = 1
|
7
|
+
|
8
|
+
# this next one should still smell
|
9
|
+
x1 = 0
|
10
|
+
|
11
|
+
# this next one should not smell
|
12
|
+
should_not_smell = true
|
13
|
+
end
|
14
|
+
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: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Rutherford
|
@@ -10,28 +10,22 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-10-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ruby_parser
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 3.1.1
|
22
19
|
- - ~>
|
23
20
|
- !ruby/object:Gem::Version
|
24
|
-
version: '3.
|
21
|
+
version: '3.2'
|
25
22
|
type: :runtime
|
26
23
|
prerelease: false
|
27
24
|
version_requirements: !ruby/object:Gem::Requirement
|
28
25
|
requirements:
|
29
|
-
- - '>='
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
version: 3.1.1
|
32
26
|
- - ~>
|
33
27
|
- !ruby/object:Gem::Version
|
34
|
-
version: '3.
|
28
|
+
version: '3.2'
|
35
29
|
- !ruby/object:Gem::Dependency
|
36
30
|
name: sexp_processor
|
37
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,180 +157,184 @@ files:
|
|
163
157
|
- Rakefile
|
164
158
|
- bin/reek
|
165
159
|
- config/defaults.reek
|
166
|
-
- features/ruby_api/api.feature
|
167
|
-
- features/command_line_interface/smells_count.feature
|
168
|
-
- features/command_line_interface/stdin.feature
|
169
|
-
- features/command_line_interface/options.feature
|
170
|
-
- features/step_definitions/reek_steps.rb
|
171
160
|
- features/support/env.rb
|
161
|
+
- features/configuration_files/masking_smells.feature
|
162
|
+
- features/configuration_files/overrides_defaults.feature
|
172
163
|
- features/samples.feature
|
173
|
-
- features/reports/reports.feature
|
174
164
|
- features/reports/yaml.feature
|
175
|
-
- features/
|
165
|
+
- features/reports/reports.feature
|
166
|
+
- features/command_line_interface/options.feature
|
167
|
+
- features/command_line_interface/smells_count.feature
|
168
|
+
- features/command_line_interface/stdin.feature
|
169
|
+
- features/step_definitions/reek_steps.rb
|
176
170
|
- features/rake_task/rake_task.feature
|
177
|
-
-
|
178
|
-
- lib/reek/spec.rb
|
171
|
+
- features/ruby_api/api.feature
|
179
172
|
- lib/reek/spec/should_reek_of.rb
|
180
173
|
- lib/reek/spec/should_reek_only_of.rb
|
181
174
|
- lib/reek/spec/should_reek.rb
|
175
|
+
- lib/reek/source/source_code.rb
|
176
|
+
- lib/reek/source/code_comment.rb
|
177
|
+
- lib/reek/source/source_file.rb
|
178
|
+
- lib/reek/source/config_file.rb
|
179
|
+
- lib/reek/source/tree_dresser.rb
|
180
|
+
- lib/reek/source/source_locator.rb
|
181
|
+
- lib/reek/source/reference_collector.rb
|
182
|
+
- lib/reek/source/sexp_formatter.rb
|
183
|
+
- lib/reek/source/core_extras.rb
|
184
|
+
- lib/reek/source/source_repository.rb
|
185
|
+
- lib/reek/core/object_refs.rb
|
186
|
+
- lib/reek/core/module_context.rb
|
187
|
+
- lib/reek/core/smell_repository.rb
|
188
|
+
- lib/reek/core/warning_collector.rb
|
189
|
+
- lib/reek/core/method_context.rb
|
190
|
+
- lib/reek/core/code_parser.rb
|
191
|
+
- lib/reek/core/hash_extensions.rb
|
192
|
+
- lib/reek/core/stop_context.rb
|
193
|
+
- lib/reek/core/singleton_method_context.rb
|
194
|
+
- lib/reek/core/code_context.rb
|
195
|
+
- lib/reek/core/sniffer.rb
|
196
|
+
- lib/reek/core/smell_configuration.rb
|
197
|
+
- lib/reek/spec.rb
|
198
|
+
- lib/reek/source.rb
|
199
|
+
- lib/reek/examiner.rb
|
200
|
+
- lib/reek/rake/task.rb
|
201
|
+
- lib/reek/smells.rb
|
202
|
+
- lib/reek/version.rb
|
182
203
|
- lib/reek/cli/version_command.rb
|
183
204
|
- lib/reek/cli/application.rb
|
184
|
-
- lib/reek/cli/command_line.rb
|
185
|
-
- lib/reek/cli/yaml_command.rb
|
186
|
-
- lib/reek/cli/help_command.rb
|
187
205
|
- lib/reek/cli/report.rb
|
188
206
|
- lib/reek/cli/reek_command.rb
|
189
|
-
- lib/reek/
|
190
|
-
- lib/reek/
|
191
|
-
- lib/reek/
|
192
|
-
- lib/reek/
|
193
|
-
- lib/reek/smells/boolean_parameter.rb
|
194
|
-
- lib/reek/smells/uncommunicative_parameter_name.rb
|
195
|
-
- lib/reek/smells/unused_parameters.rb
|
207
|
+
- lib/reek/cli/yaml_command.rb
|
208
|
+
- lib/reek/cli/command_line.rb
|
209
|
+
- lib/reek/cli/help_command.rb
|
210
|
+
- lib/reek/smells/irresponsible_module.rb
|
196
211
|
- lib/reek/smells/long_yield_list.rb
|
197
|
-
- lib/reek/smells/
|
212
|
+
- lib/reek/smells/nested_iterators.rb
|
198
213
|
- lib/reek/smells/uncommunicative_method_name.rb
|
199
|
-
- lib/reek/smells/
|
200
|
-
- lib/reek/smells/nil_check.rb
|
214
|
+
- lib/reek/smells/boolean_parameter.rb
|
201
215
|
- lib/reek/smells/class_variable.rb
|
202
|
-
- lib/reek/smells/
|
203
|
-
- lib/reek/smells/feature_envy.rb
|
204
|
-
- lib/reek/smells/irresponsible_module.rb
|
216
|
+
- lib/reek/smells/control_parameter.rb
|
205
217
|
- lib/reek/smells/utility_function.rb
|
206
|
-
- lib/reek/smells/
|
218
|
+
- lib/reek/smells/too_many_instance_variables.rb
|
207
219
|
- lib/reek/smells/too_many_methods.rb
|
208
|
-
- lib/reek/smells/
|
220
|
+
- lib/reek/smells/long_parameter_list.rb
|
221
|
+
- lib/reek/smells/nil_check.rb
|
222
|
+
- lib/reek/smells/attribute.rb
|
209
223
|
- lib/reek/smells/uncommunicative_module_name.rb
|
210
|
-
- lib/reek/smells/
|
211
|
-
- lib/reek/smells/
|
212
|
-
- lib/reek/smells/too_many_instance_variables.rb
|
224
|
+
- lib/reek/smells/repeated_conditional.rb
|
225
|
+
- lib/reek/smells/uncommunicative_parameter_name.rb
|
213
226
|
- lib/reek/smells/smell_detector.rb
|
214
|
-
- lib/reek/smells/
|
227
|
+
- lib/reek/smells/feature_envy.rb
|
215
228
|
- lib/reek/smells/too_many_statements.rb
|
216
|
-
- lib/reek/smells.rb
|
217
|
-
- lib/reek/
|
218
|
-
- lib/reek/
|
219
|
-
- lib/reek/
|
220
|
-
- lib/reek/
|
221
|
-
- lib/reek
|
222
|
-
-
|
223
|
-
-
|
224
|
-
- lib/reek/source/code_comment.rb
|
225
|
-
- lib/reek/source/source_locator.rb
|
226
|
-
- lib/reek/source/tree_dresser.rb
|
227
|
-
- lib/reek/source.rb
|
228
|
-
- lib/reek/core/smell_configuration.rb
|
229
|
-
- lib/reek/core/method_context.rb
|
230
|
-
- lib/reek/core/code_parser.rb
|
231
|
-
- lib/reek/core/module_context.rb
|
232
|
-
- lib/reek/core/stop_context.rb
|
233
|
-
- lib/reek/core/code_context.rb
|
234
|
-
- lib/reek/core/sniffer.rb
|
235
|
-
- lib/reek/core/hash_extensions.rb
|
236
|
-
- lib/reek/core/smell_repository.rb
|
237
|
-
- lib/reek/core/object_refs.rb
|
238
|
-
- lib/reek/core/singleton_method_context.rb
|
239
|
-
- lib/reek/core/warning_collector.rb
|
240
|
-
- spec/matchers/smell_of_matcher.rb
|
241
|
-
- spec/spec_helper.rb
|
229
|
+
- lib/reek/smells/uncommunicative_variable_name.rb
|
230
|
+
- lib/reek/smells/unused_parameters.rb
|
231
|
+
- lib/reek/smells/duplicate_method_call.rb
|
232
|
+
- lib/reek/smells/data_clump.rb
|
233
|
+
- lib/reek/smell_warning.rb
|
234
|
+
- lib/reek.rb
|
235
|
+
- spec/gem/yard_spec.rb
|
236
|
+
- spec/gem/updates_spec.rb
|
242
237
|
- spec/reek/spec/should_reek_of_spec.rb
|
243
|
-
- spec/reek/spec/should_reek_spec.rb
|
244
238
|
- spec/reek/spec/should_reek_only_of_spec.rb
|
239
|
+
- spec/reek/spec/should_reek_spec.rb
|
240
|
+
- spec/reek/source/object_source_spec.rb
|
241
|
+
- spec/reek/source/reference_collector_spec.rb
|
242
|
+
- spec/reek/source/code_comment_spec.rb
|
243
|
+
- spec/reek/source/source_code_spec.rb
|
244
|
+
- spec/reek/source/sexp_formatter_spec.rb
|
245
|
+
- spec/reek/source/tree_dresser_spec.rb
|
246
|
+
- spec/reek/core/module_context_spec.rb
|
247
|
+
- spec/reek/core/singleton_method_context_spec.rb
|
248
|
+
- spec/reek/core/code_parser_spec.rb
|
249
|
+
- spec/reek/core/code_context_spec.rb
|
250
|
+
- spec/reek/core/warning_collector_spec.rb
|
251
|
+
- spec/reek/core/object_refs_spec.rb
|
252
|
+
- spec/reek/core/smell_configuration_spec.rb
|
253
|
+
- spec/reek/core/stop_context_spec.rb
|
254
|
+
- spec/reek/core/config_spec.rb
|
255
|
+
- spec/reek/core/method_context_spec.rb
|
256
|
+
- spec/reek/smell_warning_spec.rb
|
245
257
|
- spec/reek/examiner_spec.rb
|
246
|
-
- spec/reek/cli/help_command_spec.rb
|
247
|
-
- spec/reek/cli/reek_command_spec.rb
|
248
258
|
- spec/reek/cli/yaml_command_spec.rb
|
259
|
+
- spec/reek/cli/reek_command_spec.rb
|
260
|
+
- spec/reek/cli/help_command_spec.rb
|
249
261
|
- spec/reek/cli/report_spec.rb
|
250
262
|
- spec/reek/cli/version_command_spec.rb
|
251
|
-
- spec/reek/smells/boolean_parameter_spec.rb
|
252
|
-
- spec/reek/smells/uncommunicative_method_name_spec.rb
|
253
|
-
- spec/reek/smells/uncommunicative_module_name_spec.rb
|
254
|
-
- spec/reek/smells/too_many_statements_spec.rb
|
255
|
-
- spec/reek/smells/class_variable_spec.rb
|
256
|
-
- spec/reek/smells/long_yield_list_spec.rb
|
257
|
-
- spec/reek/smells/control_parameter_spec.rb
|
258
263
|
- spec/reek/smells/unused_parameters_spec.rb
|
259
|
-
- spec/reek/smells/
|
264
|
+
- spec/reek/smells/irresponsible_module_spec.rb
|
265
|
+
- spec/reek/smells/too_many_methods_spec.rb
|
266
|
+
- spec/reek/smells/too_many_statements_spec.rb
|
267
|
+
- spec/reek/smells/uncommunicative_module_name_spec.rb
|
268
|
+
- spec/reek/smells/utility_function_spec.rb
|
260
269
|
- spec/reek/smells/long_parameter_list_spec.rb
|
270
|
+
- spec/reek/smells/control_parameter_spec.rb
|
271
|
+
- spec/reek/smells/behaves_like_variable_detector.rb
|
272
|
+
- spec/reek/smells/class_variable_spec.rb
|
261
273
|
- spec/reek/smells/attribute_spec.rb
|
274
|
+
- spec/reek/smells/uncommunicative_variable_name_spec.rb
|
262
275
|
- spec/reek/smells/data_clump_spec.rb
|
276
|
+
- spec/reek/smells/uncommunicative_parameter_name_spec.rb
|
263
277
|
- spec/reek/smells/feature_envy_spec.rb
|
264
278
|
- spec/reek/smells/smell_detector_shared.rb
|
265
|
-
- spec/reek/smells/
|
279
|
+
- spec/reek/smells/nil_check_spec.rb
|
280
|
+
- spec/reek/smells/repeated_conditional_spec.rb
|
281
|
+
- spec/reek/smells/uncommunicative_method_name_spec.rb
|
266
282
|
- spec/reek/smells/nested_iterators_spec.rb
|
283
|
+
- spec/reek/smells/long_yield_list_spec.rb
|
267
284
|
- spec/reek/smells/duplicate_method_call_spec.rb
|
285
|
+
- spec/reek/smells/boolean_parameter_spec.rb
|
268
286
|
- spec/reek/smells/too_many_instance_variables_spec.rb
|
269
|
-
- spec/
|
270
|
-
- spec/
|
271
|
-
- spec/
|
272
|
-
- spec/reek/smells/nil_check_spec.rb
|
273
|
-
- spec/reek/smells/irresponsible_module_spec.rb
|
274
|
-
- spec/reek/smells/uncommunicative_variable_name_spec.rb
|
275
|
-
- spec/reek/smell_warning_spec.rb
|
276
|
-
- spec/reek/source/reference_collector_spec.rb
|
277
|
-
- spec/reek/source/tree_dresser_spec.rb
|
278
|
-
- spec/reek/source/sexp_formatter_spec.rb
|
279
|
-
- spec/reek/source/code_comment_spec.rb
|
280
|
-
- spec/reek/source/object_source_spec.rb
|
281
|
-
- spec/reek/source/source_code_spec.rb
|
282
|
-
- spec/reek/core/object_refs_spec.rb
|
283
|
-
- spec/reek/core/warning_collector_spec.rb
|
284
|
-
- spec/reek/core/stop_context_spec.rb
|
285
|
-
- spec/reek/core/config_spec.rb
|
286
|
-
- spec/reek/core/code_parser_spec.rb
|
287
|
-
- spec/reek/core/smell_configuration_spec.rb
|
288
|
-
- spec/reek/core/module_context_spec.rb
|
289
|
-
- spec/reek/core/method_context_spec.rb
|
290
|
-
- spec/reek/core/code_context_spec.rb
|
291
|
-
- spec/reek/core/singleton_method_context_spec.rb
|
292
|
-
- spec/gem/updates_spec.rb
|
293
|
-
- spec/gem/yard_spec.rb
|
294
|
-
- spec/samples/three_clean_files/clean_one.rb
|
287
|
+
- spec/spec_helper.rb
|
288
|
+
- spec/samples/inline_config/dirty.rb
|
289
|
+
- spec/samples/inline_config/masked.reek
|
295
290
|
- spec/samples/three_clean_files/clean_two.rb
|
296
291
|
- spec/samples/three_clean_files/clean_three.rb
|
297
|
-
- spec/samples/
|
298
|
-
- spec/samples/
|
299
|
-
- spec/samples/
|
300
|
-
- spec/samples/
|
301
|
-
- spec/samples/
|
302
|
-
- spec/samples/
|
292
|
+
- spec/samples/three_clean_files/clean_one.rb
|
293
|
+
- spec/samples/clean_due_to_masking/dirty_one.rb
|
294
|
+
- spec/samples/clean_due_to_masking/masked.reek
|
295
|
+
- spec/samples/clean_due_to_masking/clean_two.rb
|
296
|
+
- spec/samples/clean_due_to_masking/dirty_two.rb
|
297
|
+
- spec/samples/clean_due_to_masking/clean_three.rb
|
298
|
+
- spec/samples/clean_due_to_masking/clean_one.rb
|
299
|
+
- spec/samples/not_quite_masked/dirty.rb
|
300
|
+
- spec/samples/not_quite_masked/masked.reek
|
301
|
+
- spec/samples/not_quite_masked/smelly.rb
|
302
|
+
- spec/samples/optparse.rb
|
303
|
+
- spec/samples/all_but_one_masked/dirty.rb
|
304
|
+
- spec/samples/all_but_one_masked/masked.reek
|
305
|
+
- spec/samples/all_but_one_masked/clean_one.rb
|
303
306
|
- spec/samples/demo/demo.rb
|
307
|
+
- spec/samples/exceptions.reek
|
308
|
+
- spec/samples/masked_by_dotfile/dirty.rb
|
309
|
+
- spec/samples/inline.rb
|
304
310
|
- spec/samples/redcloth.rb
|
305
|
-
- spec/samples/
|
306
|
-
- spec/samples/
|
307
|
-
- spec/samples/
|
311
|
+
- spec/samples/overrides/masked/dirty.rb
|
312
|
+
- spec/samples/overrides/masked/lower.reek
|
313
|
+
- spec/samples/overrides/upper.reek
|
314
|
+
- spec/samples/two_smelly_files/dirty_one.rb
|
315
|
+
- spec/samples/two_smelly_files/dirty_two.rb
|
316
|
+
- spec/samples/masked/dirty.rb
|
317
|
+
- spec/samples/masked/masked.reek
|
318
|
+
- spec/samples/config/deeper_nested_iterators.reek
|
319
|
+
- spec/samples/config/allow_duplication.reek
|
320
|
+
- spec/samples/ruby20_syntax.rb
|
321
|
+
- spec/samples/overrides_defaults/camel_case.rb
|
322
|
+
- spec/samples/overrides_defaults/config.reek
|
308
323
|
- spec/samples/corrupt_config_file/dirty.rb
|
324
|
+
- spec/samples/corrupt_config_file/corrupt.reek
|
309
325
|
- spec/samples/empty_config_file/dirty.rb
|
310
326
|
- spec/samples/empty_config_file/empty.reek
|
311
|
-
- spec/samples/masked/masked.reek
|
312
|
-
- spec/samples/masked/dirty.rb
|
313
|
-
- spec/samples/all_but_one_masked/masked.reek
|
314
|
-
- spec/samples/all_but_one_masked/clean_one.rb
|
315
|
-
- spec/samples/all_but_one_masked/dirty.rb
|
316
|
-
- spec/samples/inline.rb
|
317
|
-
- spec/samples/mask_some/dirty.rb
|
318
|
-
- spec/samples/mask_some/some.reek
|
319
|
-
- spec/samples/not_quite_masked/masked.reek
|
320
|
-
- spec/samples/not_quite_masked/dirty.rb
|
321
|
-
- spec/samples/not_quite_masked/smelly.rb
|
322
|
-
- spec/samples/exceptions.reek
|
323
|
-
- spec/samples/mixed_results/dirty_two.rb
|
324
327
|
- spec/samples/mixed_results/dirty_one.rb
|
325
|
-
- spec/samples/mixed_results/clean_one.rb
|
326
328
|
- spec/samples/mixed_results/clean_two.rb
|
329
|
+
- spec/samples/mixed_results/dirty_two.rb
|
327
330
|
- spec/samples/mixed_results/clean_three.rb
|
328
|
-
- spec/samples/
|
329
|
-
- spec/samples/
|
330
|
-
- spec/samples/
|
331
|
-
- spec/
|
332
|
-
- spec/samples/clean_due_to_masking/clean_two.rb
|
333
|
-
- spec/samples/clean_due_to_masking/clean_three.rb
|
334
|
-
- spec/samples/optparse.rb
|
335
|
-
- spec/samples/two_smelly_files/dirty_two.rb
|
336
|
-
- spec/samples/two_smelly_files/dirty_one.rb
|
331
|
+
- spec/samples/mixed_results/clean_one.rb
|
332
|
+
- spec/samples/mask_some/dirty.rb
|
333
|
+
- spec/samples/mask_some/some.reek
|
334
|
+
- spec/matchers/smell_of_matcher.rb
|
337
335
|
- tasks/test.rake
|
338
|
-
- tasks/reek.rake
|
339
336
|
- tasks/develop.rake
|
337
|
+
- tasks/reek.rake
|
340
338
|
- reek.gemspec
|
341
339
|
homepage: http://wiki.github.com/troessner/reek
|
342
340
|
licenses: []
|
@@ -359,7 +357,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
359
357
|
version: '0'
|
360
358
|
requirements: []
|
361
359
|
rubyforge_project: reek
|
362
|
-
rubygems_version: 2.0.
|
360
|
+
rubygems_version: 2.0.6
|
363
361
|
signing_key:
|
364
362
|
specification_version: 4
|
365
363
|
summary: Code smell detector for Ruby
|