reek 3.6.1 → 3.7.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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/features/command_line_interface/basic_usage.feature +8 -8
  4. data/features/command_line_interface/options.feature +2 -1
  5. data/features/command_line_interface/smell_selection.feature +1 -1
  6. data/features/command_line_interface/smells_count.feature +8 -8
  7. data/features/command_line_interface/stdin.feature +3 -3
  8. data/features/configuration_files/directory_specific_directives.feature +9 -9
  9. data/features/configuration_files/masking_smells.feature +5 -5
  10. data/features/configuration_loading.feature +6 -6
  11. data/features/programmatic_access.feature +3 -3
  12. data/features/rake_task/rake_task.feature +9 -9
  13. data/features/reports/json.feature +4 -0
  14. data/features/reports/reports.feature +49 -37
  15. data/features/reports/yaml.feature +4 -0
  16. data/features/samples.feature +265 -265
  17. data/lib/reek/cli/options.rb +5 -4
  18. data/lib/reek/cli/warning_collector.rb +1 -1
  19. data/lib/reek/report.rb +2 -1
  20. data/lib/reek/report/code_climate_formatter.rb +46 -0
  21. data/lib/reek/report/formatter.rb +13 -8
  22. data/lib/reek/report/report.rb +12 -0
  23. data/lib/reek/smells/smell_warning.rb +2 -2
  24. data/lib/reek/version.rb +1 -1
  25. data/reek.gemspec +5 -4
  26. data/spec/reek/report/code_climate_formatter_spec.rb +63 -0
  27. data/spec/reek/report/code_climate_report_spec.rb +68 -0
  28. data/spec/reek/report/json_report_spec.rb +18 -18
  29. data/spec/reek/report/yaml_report_spec.rb +17 -17
  30. data/spec/reek/smells/smell_warning_spec.rb +11 -11
  31. data/spec/samples/checkstyle.xml +1 -1
  32. metadata +20 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6656a7be5a8741a3d09652e3d4fffa05f06d8e8e
4
- data.tar.gz: fe908f1791d3ca5ff1dddee324569dbc52293f6c
3
+ metadata.gz: abd5004377700bed9881c5ed437ec2a9d19caa23
4
+ data.tar.gz: 8a4c3835fb589450122e13b4b449413aa93c9bcc
5
5
  SHA512:
6
- metadata.gz: b90ac67fe60415c01a8b9330acdabbfa61ba82627e2a22f5e899b8bb2e7683d055b05ddfbf0643a3dffa551a1e39823d76df08a5496b70ddbb15a9928475236f
7
- data.tar.gz: 8adff3362ad6e24ac4a2f91b8e8325fb4432f890a66a10fc3ced5fd997ab9029642283eec0f2550d3c84c8777ae53d00eefa83be3cc95dae1e15e1d10ca8434a
6
+ metadata.gz: fe96cf2b530e92d25370691e3b8584825b9243016639073575817893dd7645a97bee491b8b73d0e04166a86e0602271186744d1b1eeec9285a4abc533fe9e813
7
+ data.tar.gz: 1b98379f0590f06b76dcc6e8031a4c7fedeca3af08ba3189c516b3e12bf754addc1e2155747807ef48c65569bedaa389ab0d0a4aa8e34fba03b1e0f8cb939a6f
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.7.0 (2015-11-17)
6
+
7
+ * (andyw8) Add Code Climate JSON report format: `--format code_climate`
8
+ * (chastell) Simplify `text` report format and enable `--wiki-links` by default
9
+
5
10
  ## 3.6.1 (2015-11-13)
6
11
 
7
12
  * (mvz) Make UtilityFunction not report methods that call `super` with
@@ -10,12 +10,12 @@ Feature: The Reek CLI maintains backwards compatibility
10
10
  And it reports:
11
11
  """
12
12
  demo.rb -- 8 warnings:
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
- [5]:Dirty#awful has the variable name 'w' (UncommunicativeVariableName)
18
- [3]:Dirty#awful has unused parameter 'log' (UnusedParameters)
19
- [3]:Dirty#awful has unused parameter 'offset' (UnusedParameters)
20
- [3]:Dirty#awful has unused parameter 'y' (UnusedParameters)
13
+ [3]:BooleanParameter: Dirty#awful has boolean parameter 'log' [https://github.com/troessner/reek/blob/master/docs/Boolean-Parameter.md]
14
+ [1]:IrresponsibleModule: Dirty has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
15
+ [3]:LongParameterList: Dirty#awful has 4 parameters [https://github.com/troessner/reek/blob/master/docs/Long-Parameter-List.md]
16
+ [3]:UncommunicativeParameterName: Dirty#awful has the parameter name 'x' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Parameter-Name.md]
17
+ [5]:UncommunicativeVariableName: Dirty#awful has the variable name 'w' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Variable-Name.md]
18
+ [3]:UnusedParameters: Dirty#awful has unused parameter 'log' [https://github.com/troessner/reek/blob/master/docs/Unused-Parameters.md]
19
+ [3]:UnusedParameters: Dirty#awful has unused parameter 'offset' [https://github.com/troessner/reek/blob/master/docs/Unused-Parameters.md]
20
+ [3]:UnusedParameters: Dirty#awful has unused parameter 'y' [https://github.com/troessner/reek/blob/master/docs/Unused-Parameters.md]
21
21
  """
@@ -40,11 +40,12 @@ Feature: Reek can be controlled using command-line options
40
40
  yaml
41
41
  json
42
42
  xml
43
+ code_climate
43
44
 
44
45
  Text format options:
45
46
  --[no-]color Use colors for the output (default: true)
46
47
  -V, --[no-]empty-headings Show headings for smell-free source files (default: false)
47
- -U, --[no-]wiki-links Show link to related wiki page for each smell (default: false)
48
+ -U, --[no-]wiki-links Show link to related wiki page for each smell (default: true)
48
49
  -n, --[no-]line-numbers Show line numbers in the output (default: true)
49
50
  -s, --single-line Show location in editor-compatible single-line-per-smell format
50
51
  --sort-by SORTING Sort reported files by the given criterium:
@@ -11,5 +11,5 @@ Feature: Smell selection
11
11
  And it reports:
12
12
  """
13
13
  smelly.rb -- 1 warning:
14
- Smelly#m has the name 'm' (UncommunicativeMethodName)
14
+ UncommunicativeMethodName: Smelly#m has the name 'm' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
15
15
  """
@@ -9,9 +9,9 @@ Feature: Reports total number of code smells
9
9
  And it reports:
10
10
  """
11
11
  smelly.rb -- 3 warnings:
12
- [4, 5]:Smelly#m calls @foo.bar 2 times (DuplicateMethodCall)
13
- [4, 5]:Smelly#m calls puts(@foo.bar) 2 times (DuplicateMethodCall)
14
- [3]:Smelly#m has the name 'm' (UncommunicativeMethodName)
12
+ [4, 5]:DuplicateMethodCall: Smelly#m calls @foo.bar 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
13
+ [4, 5]:DuplicateMethodCall: Smelly#m calls puts(@foo.bar) 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
14
+ [3]:UncommunicativeMethodName: Smelly#m has the name 'm' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
15
15
  """
16
16
 
17
17
  Scenario: Output total number of smells when inspecting multiple files
@@ -21,12 +21,12 @@ Feature: Reports total number of code smells
21
21
  And it reports:
22
22
  """
23
23
  smelly/dirty_one.rb -- 2 warnings:
24
- [1]:Dirty has no descriptive comment (IrresponsibleModule)
25
- [2]:Dirty#a has the name 'a' (UncommunicativeMethodName)
24
+ [1]:IrresponsibleModule: Dirty has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
25
+ [2]:UncommunicativeMethodName: Dirty#a has the name 'a' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
26
26
  smelly/dirty_two.rb -- 3 warnings:
27
- [1]:Dirty has no descriptive comment (IrresponsibleModule)
28
- [2]:Dirty#a has the name 'a' (UncommunicativeMethodName)
29
- [3]:Dirty#b has the name 'b' (UncommunicativeMethodName)
27
+ [1]:IrresponsibleModule: Dirty has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
28
+ [2]:UncommunicativeMethodName: Dirty#a has the name 'a' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
29
+ [3]:UncommunicativeMethodName: Dirty#b has the name 'b' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
30
30
  5 total warnings
31
31
  """
32
32
 
@@ -27,9 +27,9 @@ Feature: Reek reads from $stdin when no files are given
27
27
  And it reports:
28
28
  """
29
29
  STDIN -- 3 warnings:
30
- [1]:Turn has no descriptive comment (IrresponsibleModule)
31
- [1]:Turn has the variable name '@x' (UncommunicativeVariableName)
32
- [1]:Turn#y has the name 'y' (UncommunicativeMethodName)
30
+ [1]:IrresponsibleModule: Turn has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
31
+ [1]:UncommunicativeMethodName: Turn#y has the name 'y' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
32
+ [1]:UncommunicativeVariableName: Turn has the variable name '@x' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Variable-Name.md]
33
33
  """
34
34
 
35
35
  Scenario: syntax error causes the source to be ignored
@@ -50,8 +50,8 @@ Feature: Directory directives
50
50
  Then it reports:
51
51
  """
52
52
  web_app/app/models/user.rb -- 2 warnings:
53
- [1]:User has no descriptive comment (IrresponsibleModule)
54
- [2]:User#logged_in_with_role has unused parameter 'r' (UnusedParameters)
53
+ [1]:IrresponsibleModule: User has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
54
+ [2]:UnusedParameters: User#logged_in_with_role has unused parameter 'r' [https://github.com/troessner/reek/blob/master/docs/Unused-Parameters.md]
55
55
  2 total warnings
56
56
  """
57
57
 
@@ -119,10 +119,10 @@ Feature: Directory directives
119
119
  Then it reports:
120
120
  """
121
121
  web_app/app/controllers/users_controller.rb -- 2 warnings:
122
- [1]:UsersController has no descriptive comment (IrresponsibleModule)
123
- [4]:UsersController#show contains iterators nested 2 deep (NestedIterators)
122
+ [1]:IrresponsibleModule: UsersController has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
123
+ [4]:NestedIterators: UsersController#show contains iterators nested 2 deep [https://github.com/troessner/reek/blob/master/docs/Nested-Iterators.md]
124
124
  web_app/app/models/user.rb -- 1 warning:
125
- [2]:User#logged_in_with_role has unused parameter 'r' (UnusedParameters)
125
+ [2]:UnusedParameters: User#logged_in_with_role has unused parameter 'r' [https://github.com/troessner/reek/blob/master/docs/Unused-Parameters.md]
126
126
  3 total warnings
127
127
  """
128
128
 
@@ -164,9 +164,9 @@ Feature: Directory directives
164
164
  Then it reports:
165
165
  """
166
166
  other/projects_controller.rb -- 1 warning:
167
- [4]:ProjectController#show contains iterators nested 2 deep (NestedIterators)
167
+ [4]:NestedIterators: ProjectController#show contains iterators nested 2 deep [https://github.com/troessner/reek/blob/master/docs/Nested-Iterators.md]
168
168
  web_app/app/controllers/users_controller.rb -- 1 warning:
169
- [1]:UsersController has no descriptive comment (IrresponsibleModule)
169
+ [1]:IrresponsibleModule: UsersController has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
170
170
  2 total warnings
171
171
  """
172
172
 
@@ -273,8 +273,8 @@ Feature: Directory directives
273
273
  Then it reports:
274
274
  """
275
275
  foo/bar/baz/klass.rb -- 1 warning:
276
- [4]:Klass#meth contains iterators nested 2 deep (NestedIterators)
276
+ [4]:NestedIterators: Klass#meth contains iterators nested 2 deep [https://github.com/troessner/reek/blob/master/docs/Nested-Iterators.md]
277
277
  foo/bar/klazz.rb -- 1 warning:
278
- [1]:Klazz has no descriptive comment (IrresponsibleModule)
278
+ [1]:IrresponsibleModule: Klazz has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
279
279
  2 total warnings
280
280
  """
@@ -30,8 +30,8 @@ Feature: Masking smells using config files
30
30
  And it reports:
31
31
  """
32
32
  smelly.rb -- 2 warnings:
33
- [4, 5]:Smelly#m calls @foo.bar 2 times (DuplicateMethodCall)
34
- [3]:Smelly#m has the name 'm' (UncommunicativeMethodName)
33
+ [4, 5]:DuplicateMethodCall: Smelly#m calls @foo.bar 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
34
+ [3]:UncommunicativeMethodName: Smelly#m has the name 'm' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
35
35
  """
36
36
 
37
37
  Scenario: provide extra masking inline in comments
@@ -42,8 +42,8 @@ Feature: Masking smells using config files
42
42
  And it reports:
43
43
  """
44
44
  inline.rb -- 2 warnings:
45
- [5]:Dirty has the variable name '@s' (UncommunicativeVariableName)
46
- [5]:Dirty#a has the variable name 'x' (UncommunicativeVariableName)
45
+ [5]:UncommunicativeVariableName: Dirty has the variable name '@s' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Variable-Name.md]
46
+ [5]:UncommunicativeVariableName: Dirty#a has the variable name 'x' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Variable-Name.md]
47
47
  """
48
48
 
49
49
  Scenario: Disable UtilityFunction for non-public methods
@@ -54,6 +54,6 @@ Feature: Masking smells using config files
54
54
  And it reports:
55
55
  """
56
56
  smelly.rb -- 1 warning:
57
- [3]:Klass#public_method doesn't depend on instance state (maybe move it to another class?) (UtilityFunction)
57
+ [3]:UtilityFunction: Klass#public_method doesn't depend on instance state (maybe move it to another class?) [https://github.com/troessner/reek/blob/master/docs/Utility-Function.md]
58
58
  """
59
59
  But it does not report private or protected methods
@@ -17,9 +17,9 @@ Feature: Offer different ways how to load configuration
17
17
  And it reports:
18
18
  """
19
19
  smelly.rb -- 3 warnings:
20
- [4, 5]:Smelly#m calls @foo.bar 2 times (DuplicateMethodCall)
21
- [4, 5]:Smelly#m calls puts(@foo.bar) 2 times (DuplicateMethodCall)
22
- [3]:Smelly#m has the name 'm' (UncommunicativeMethodName)
20
+ [4, 5]:DuplicateMethodCall: Smelly#m calls @foo.bar 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
21
+ [4, 5]:DuplicateMethodCall: Smelly#m calls puts(@foo.bar) 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
22
+ [3]:UncommunicativeMethodName: Smelly#m has the name 'm' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
23
23
  """
24
24
 
25
25
  Scenario: Configuration via CLI
@@ -45,7 +45,7 @@ Feature: Offer different ways how to load configuration
45
45
  And it reports:
46
46
  """
47
47
  smelly.rb -- 3 warnings:
48
- [4, 5]:Smelly#m calls @foo.bar 2 times (DuplicateMethodCall)
49
- [4, 5]:Smelly#m calls puts(@foo.bar) 2 times (DuplicateMethodCall)
50
- [3]:Smelly#m has the name 'm' (UncommunicativeMethodName)
48
+ [4, 5]:DuplicateMethodCall: Smelly#m calls @foo.bar 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
49
+ [4, 5]:DuplicateMethodCall: Smelly#m calls puts(@foo.bar) 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
50
+ [3]:UncommunicativeMethodName: Smelly#m has the name 'm' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
51
51
  """
@@ -37,7 +37,7 @@ Feature: Using Reek programmatically
37
37
  And it reports:
38
38
  """
39
39
  smelly.rb -- 3 warnings:
40
- Smelly#m calls @foo.bar 2 times (DuplicateMethodCall)
41
- Smelly#m calls puts(@foo.bar) 2 times (DuplicateMethodCall)
42
- Smelly#m has the name 'm' (UncommunicativeMethodName)
40
+ DuplicateMethodCall: Smelly#m calls @foo.bar 2 times
41
+ DuplicateMethodCall: Smelly#m calls puts(@foo.bar) 2 times
42
+ UncommunicativeMethodName: Smelly#m has the name 'm'
43
43
  """
@@ -15,9 +15,9 @@ Feature: Reek can be driven through its Task
15
15
  And it reports:
16
16
  """
17
17
  smelly.rb -- 3 warnings:
18
- [4, 5]:Smelly#m calls @foo.bar 2 times (DuplicateMethodCall)
19
- [4, 5]:Smelly#m calls puts(@foo.bar) 2 times (DuplicateMethodCall)
20
- [3]:Smelly#m has the name 'm' (UncommunicativeMethodName)
18
+ [4, 5]:DuplicateMethodCall: Smelly#m calls @foo.bar 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
19
+ [4, 5]:DuplicateMethodCall: Smelly#m calls puts(@foo.bar) 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
20
+ [3]:UncommunicativeMethodName: Smelly#m has the name 'm' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
21
21
  """
22
22
 
23
23
  Scenario: name changes the task name
@@ -33,9 +33,9 @@ Feature: Reek can be driven through its Task
33
33
  And it reports:
34
34
  """
35
35
  smelly.rb -- 3 warnings:
36
- [4, 5]:Smelly#m calls @foo.bar 2 times (DuplicateMethodCall)
37
- [4, 5]:Smelly#m calls puts(@foo.bar) 2 times (DuplicateMethodCall)
38
- [3]:Smelly#m has the name 'm' (UncommunicativeMethodName)
36
+ [4, 5]:DuplicateMethodCall: Smelly#m calls @foo.bar 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
37
+ [4, 5]:DuplicateMethodCall: Smelly#m calls puts(@foo.bar) 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
38
+ [3]:UncommunicativeMethodName: Smelly#m has the name 'm' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
39
39
  """
40
40
 
41
41
  Scenario: verbose prints the reek command
@@ -65,9 +65,9 @@ Feature: Reek can be driven through its Task
65
65
  And it reports:
66
66
  """
67
67
  smelly.rb -- 3 warnings:
68
- [4, 5]:Smelly#m calls @foo.bar 2 times (DuplicateMethodCall)
69
- [4, 5]:Smelly#m calls puts(@foo.bar) 2 times (DuplicateMethodCall)
70
- [3]:Smelly#m has the name 'm' (UncommunicativeMethodName)
68
+ [4, 5]:DuplicateMethodCall: Smelly#m calls @foo.bar 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
69
+ [4, 5]:DuplicateMethodCall: Smelly#m calls puts(@foo.bar) 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
70
+ [3]:UncommunicativeMethodName: Smelly#m has the name 'm' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
71
71
  """
72
72
 
73
73
  Scenario: can be configured with config_file
@@ -26,6 +26,7 @@ Feature: Report smells using simple JSON layout
26
26
  "lines": [ 4, 5 ],
27
27
  "message": "calls @foo.bar 2 times",
28
28
  "name": "@foo.bar",
29
+ "wiki_link": "https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md",
29
30
  "count": 2
30
31
  },
31
32
  {
@@ -36,6 +37,7 @@ Feature: Report smells using simple JSON layout
36
37
  "lines": [ 4, 5 ],
37
38
  "message": "calls puts(@foo.bar) 2 times",
38
39
  "name": "puts(@foo.bar)",
40
+ "wiki_link": "https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md",
39
41
  "count": 2
40
42
  },
41
43
  {
@@ -45,6 +47,7 @@ Feature: Report smells using simple JSON layout
45
47
  "context": "Smelly#m",
46
48
  "lines": [ 3 ],
47
49
  "message": "has the name 'm'",
50
+ "wiki_link": "https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md",
48
51
  "name": "m"
49
52
  }
50
53
  ]
@@ -65,6 +68,7 @@ Feature: Report smells using simple JSON layout
65
68
  1
66
69
  ],
67
70
  "message": "has no descriptive comment",
71
+ "wiki_link": "https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md",
68
72
  "name": "Turn"
69
73
  }
70
74
  ]
@@ -10,12 +10,12 @@ Feature: Correctly formatted reports
10
10
  And it reports:
11
11
  """
12
12
  smelly/dirty_one.rb -- 2 warnings:
13
- [1]:Dirty has no descriptive comment (IrresponsibleModule)
14
- [2]:Dirty#a has the name 'a' (UncommunicativeMethodName)
13
+ [1]:IrresponsibleModule: Dirty has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
14
+ [2]:UncommunicativeMethodName: Dirty#a has the name 'a' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
15
15
  smelly/dirty_two.rb -- 3 warnings:
16
- [1]:Dirty has no descriptive comment (IrresponsibleModule)
17
- [2]:Dirty#a has the name 'a' (UncommunicativeMethodName)
18
- [3]:Dirty#b has the name 'b' (UncommunicativeMethodName)
16
+ [1]:IrresponsibleModule: Dirty has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
17
+ [2]:UncommunicativeMethodName: Dirty#a has the name 'a' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
18
+ [3]:UncommunicativeMethodName: Dirty#b has the name 'b' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
19
19
  5 total warnings
20
20
  """
21
21
 
@@ -31,12 +31,12 @@ Feature: Correctly formatted reports
31
31
  And it reports:
32
32
  """
33
33
  smelly/dirty_one.rb -- 2 warnings:
34
- [1]:Dirty has no descriptive comment (IrresponsibleModule)
35
- [2]:Dirty#a has the name 'a' (UncommunicativeMethodName)
34
+ [1]:IrresponsibleModule: Dirty has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
35
+ [2]:UncommunicativeMethodName: Dirty#a has the name 'a' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
36
36
  smelly/dirty_two.rb -- 3 warnings:
37
- [1]:Dirty has no descriptive comment (IrresponsibleModule)
38
- [2]:Dirty#a has the name 'a' (UncommunicativeMethodName)
39
- [3]:Dirty#b has the name 'b' (UncommunicativeMethodName)
37
+ [1]:IrresponsibleModule: Dirty has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
38
+ [2]:UncommunicativeMethodName: Dirty#a has the name 'a' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
39
+ [3]:UncommunicativeMethodName: Dirty#b has the name 'b' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
40
40
  5 total warnings
41
41
  """
42
42
 
@@ -53,12 +53,12 @@ Feature: Correctly formatted reports
53
53
  And it reports:
54
54
  """
55
55
  smelly/dirty_two.rb -- 3 warnings:
56
- [1]:Dirty has no descriptive comment (IrresponsibleModule)
57
- [2]:Dirty#a has the name 'a' (UncommunicativeMethodName)
58
- [3]:Dirty#b has the name 'b' (UncommunicativeMethodName)
56
+ [1]:IrresponsibleModule: Dirty has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
57
+ [2]:UncommunicativeMethodName: Dirty#a has the name 'a' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
58
+ [3]:UncommunicativeMethodName: Dirty#b has the name 'b' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
59
59
  smelly/dirty_one.rb -- 2 warnings:
60
- [1]:Dirty has no descriptive comment (IrresponsibleModule)
61
- [2]:Dirty#a has the name 'a' (UncommunicativeMethodName)
60
+ [1]:IrresponsibleModule: Dirty has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
61
+ [2]:UncommunicativeMethodName: Dirty#a has the name 'a' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
62
62
  5 total warnings
63
63
  """
64
64
 
@@ -114,9 +114,9 @@ Feature: Correctly formatted reports
114
114
  And it reports:
115
115
  """
116
116
  smelly.rb -- 3 warnings:
117
- Smelly#m calls @foo.bar 2 times (DuplicateMethodCall)
118
- Smelly#m calls puts(@foo.bar) 2 times (DuplicateMethodCall)
119
- Smelly#m has the name 'm' (UncommunicativeMethodName)
117
+ DuplicateMethodCall: Smelly#m calls @foo.bar 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
118
+ DuplicateMethodCall: Smelly#m calls puts(@foo.bar) 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
119
+ UncommunicativeMethodName: Smelly#m has the name 'm' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
120
120
  """
121
121
 
122
122
  Examples:
@@ -132,9 +132,9 @@ Feature: Correctly formatted reports
132
132
  And it reports:
133
133
  """
134
134
  smelly.rb -- 3 warnings:
135
- [4, 5]:Smelly#m calls @foo.bar 2 times (DuplicateMethodCall)
136
- [4, 5]:Smelly#m calls puts(@foo.bar) 2 times (DuplicateMethodCall)
137
- [3]:Smelly#m has the name 'm' (UncommunicativeMethodName)
135
+ [4, 5]:DuplicateMethodCall: Smelly#m calls @foo.bar 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
136
+ [4, 5]:DuplicateMethodCall: Smelly#m calls puts(@foo.bar) 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
137
+ [3]:UncommunicativeMethodName: Smelly#m has the name 'm' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
138
138
  """
139
139
 
140
140
  Examples:
@@ -150,9 +150,9 @@ Feature: Correctly formatted reports
150
150
  And it reports:
151
151
  """
152
152
  smelly.rb -- 3 warnings:
153
- smelly.rb:4: Smelly#m calls @foo.bar 2 times (DuplicateMethodCall)
154
- smelly.rb:4: Smelly#m calls puts(@foo.bar) 2 times (DuplicateMethodCall)
155
- smelly.rb:3: Smelly#m has the name 'm' (UncommunicativeMethodName)
153
+ smelly.rb:4: DuplicateMethodCall: Smelly#m calls @foo.bar 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
154
+ smelly.rb:4: DuplicateMethodCall: Smelly#m calls puts(@foo.bar) 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
155
+ smelly.rb:3: UncommunicativeMethodName: Smelly#m has the name 'm' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
156
156
  """
157
157
 
158
158
  Examples:
@@ -169,12 +169,12 @@ Feature: Correctly formatted reports
169
169
  And it reports:
170
170
  """
171
171
  smelly/dirty_one.rb -- 2 warnings:
172
- [1]:Dirty has no descriptive comment (IrresponsibleModule)
173
- [2]:Dirty#a has the name 'a' (UncommunicativeMethodName)
172
+ [1]:IrresponsibleModule: Dirty has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
173
+ [2]:UncommunicativeMethodName: Dirty#a has the name 'a' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
174
174
  smelly/dirty_two.rb -- 3 warnings:
175
- [1]:Dirty has no descriptive comment (IrresponsibleModule)
176
- [2]:Dirty#a has the name 'a' (UncommunicativeMethodName)
177
- [3]:Dirty#b has the name 'b' (UncommunicativeMethodName)
175
+ [1]:IrresponsibleModule: Dirty has no descriptive comment [https://github.com/troessner/reek/blob/master/docs/Irresponsible-Module.md]
176
+ [2]:UncommunicativeMethodName: Dirty#a has the name 'a' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
177
+ [3]:UncommunicativeMethodName: Dirty#b has the name 'b' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
178
178
  5 total warnings
179
179
  """
180
180
 
@@ -190,16 +190,28 @@ Feature: Correctly formatted reports
190
190
  And it reports:
191
191
  """
192
192
  smelly.rb -- 3 warnings:
193
- [4, 5]:Smelly#m calls @foo.bar 2 times (DuplicateMethodCall) [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
194
- [4, 5]:Smelly#m calls puts(@foo.bar) 2 times (DuplicateMethodCall) [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
195
- [3]:Smelly#m has the name 'm' (UncommunicativeMethodName) [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
193
+ [4, 5]:DuplicateMethodCall: Smelly#m calls @foo.bar 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
194
+ [4, 5]:DuplicateMethodCall: Smelly#m calls puts(@foo.bar) 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
195
+ [3]:UncommunicativeMethodName: Smelly#m has the name 'm' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
196
196
  """
197
197
 
198
198
  Examples:
199
- | option |
200
- | -U |
199
+ | option |
200
+ | -U |
201
201
  | --wiki-links |
202
202
 
203
+ Scenario: --no-wiki-links drops links from smell warnings
204
+ Given a smelly file called 'smelly.rb'
205
+ When I run reek --no-wiki-links smelly.rb
206
+ Then the exit status indicates smells
207
+ And it reports:
208
+ """
209
+ smelly.rb -- 3 warnings:
210
+ [4, 5]:DuplicateMethodCall: Smelly#m calls @foo.bar 2 times
211
+ [4, 5]:DuplicateMethodCall: Smelly#m calls puts(@foo.bar) 2 times
212
+ [3]:UncommunicativeMethodName: Smelly#m has the name 'm'
213
+ """
214
+
203
215
  Scenario Outline: --wiki-links is independent of --line-numbers
204
216
  Given a smelly file called 'smelly.rb'
205
217
  When I run reek <option> smelly.rb
@@ -207,9 +219,9 @@ Feature: Correctly formatted reports
207
219
  And it reports:
208
220
  """
209
221
  smelly.rb -- 3 warnings:
210
- Smelly#m calls @foo.bar 2 times (DuplicateMethodCall) [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
211
- Smelly#m calls puts(@foo.bar) 2 times (DuplicateMethodCall) [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
212
- Smelly#m has the name 'm' (UncommunicativeMethodName) [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
222
+ DuplicateMethodCall: Smelly#m calls @foo.bar 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
223
+ DuplicateMethodCall: Smelly#m calls puts(@foo.bar) 2 times [https://github.com/troessner/reek/blob/master/docs/Duplicate-Method-Call.md]
224
+ UncommunicativeMethodName: Smelly#m has the name 'm' [https://github.com/troessner/reek/blob/master/docs/Uncommunicative-Method-Name.md]
213
225
  """
214
226
 
215
227
  Examples: