reek 3.1 → 3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -2
  3. data/{CHANGELOG → CHANGELOG.md} +150 -123
  4. data/README.md +61 -21
  5. data/Rakefile +2 -1
  6. data/bin/reek +1 -0
  7. data/config/defaults.reek +2 -2
  8. data/docs/Attribute.md +9 -13
  9. data/docs/Basic-Smell-Options.md +2 -2
  10. data/docs/Command-Line-Options.md +2 -2
  11. data/docs/Too-Many-Instance-Variables.md +1 -1
  12. data/features/samples.feature +22 -31
  13. data/features/step_definitions/sample_file_steps.rb +2 -2
  14. data/features/support/env.rb +1 -0
  15. data/lib/reek.rb +1 -0
  16. data/lib/reek/ast/ast_node_class_map.rb +5 -1
  17. data/lib/reek/ast/node.rb +4 -2
  18. data/lib/reek/ast/object_refs.rb +9 -5
  19. data/lib/reek/ast/reference_collector.rb +4 -2
  20. data/lib/reek/cli/application.rb +12 -9
  21. data/lib/reek/cli/command.rb +4 -0
  22. data/lib/reek/cli/input.rb +4 -4
  23. data/lib/reek/cli/option_interpreter.rb +11 -7
  24. data/lib/reek/cli/options.rb +42 -40
  25. data/lib/reek/cli/reek_command.rb +3 -3
  26. data/lib/reek/cli/warning_collector.rb +7 -3
  27. data/lib/reek/code_comment.rb +5 -1
  28. data/lib/reek/configuration/app_configuration.rb +4 -4
  29. data/lib/reek/context/code_context.rb +19 -17
  30. data/lib/reek/examiner.rb +8 -6
  31. data/lib/reek/rake/task.rb +13 -22
  32. data/lib/reek/report/formatter.rb +5 -1
  33. data/lib/reek/report/report.rb +46 -44
  34. data/lib/reek/smells/attribute.rb +42 -24
  35. data/lib/reek/smells/control_parameter.rb +21 -13
  36. data/lib/reek/smells/data_clump.rb +17 -9
  37. data/lib/reek/smells/duplicate_method_call.rb +12 -6
  38. data/lib/reek/smells/long_parameter_list.rb +2 -2
  39. data/lib/reek/smells/long_yield_list.rb +4 -4
  40. data/lib/reek/smells/nested_iterators.rb +4 -2
  41. data/lib/reek/smells/nil_check.rb +6 -2
  42. data/lib/reek/smells/repeated_conditional.rb +2 -2
  43. data/lib/reek/smells/smell_configuration.rb +15 -7
  44. data/lib/reek/smells/smell_detector.rb +23 -10
  45. data/lib/reek/smells/smell_repository.rb +9 -16
  46. data/lib/reek/smells/smell_warning.rb +6 -6
  47. data/lib/reek/smells/too_many_instance_variables.rb +4 -4
  48. data/lib/reek/smells/too_many_methods.rb +2 -2
  49. data/lib/reek/smells/too_many_statements.rb +4 -4
  50. data/lib/reek/smells/uncommunicative_method_name.rb +5 -5
  51. data/lib/reek/smells/uncommunicative_module_name.rb +5 -5
  52. data/lib/reek/smells/uncommunicative_parameter_name.rb +8 -4
  53. data/lib/reek/smells/uncommunicative_variable_name.rb +8 -4
  54. data/lib/reek/source/source_code.rb +6 -2
  55. data/lib/reek/source/source_locator.rb +4 -4
  56. data/lib/reek/spec/should_reek.rb +9 -4
  57. data/lib/reek/spec/should_reek_of.rb +8 -5
  58. data/lib/reek/spec/should_reek_only_of.rb +12 -8
  59. data/lib/reek/tree_dresser.rb +6 -2
  60. data/lib/reek/tree_walker.rb +28 -22
  61. data/lib/reek/version.rb +1 -1
  62. data/reek.gemspec +6 -5
  63. data/spec/gem/yard_spec.rb +6 -9
  64. data/spec/reek/code_comment_spec.rb +1 -1
  65. data/spec/reek/report/xml_report_spec.rb +11 -21
  66. data/spec/reek/smells/attribute_spec.rb +73 -57
  67. data/spec/reek/smells/too_many_instance_variables_spec.rb +26 -12
  68. data/spec/reek/source/source_locator_spec.rb +2 -2
  69. data/spec/samples/checkstyle.xml +12 -1
  70. data/spec/spec_helper.rb +1 -0
  71. metadata +20 -7
  72. data/spec/samples/unusual_syntax.rb +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c490c79513c93451a148336881db8ffec7665e7e
4
- data.tar.gz: 88059b5d7db2a76be01ca26339e3753f1ef4fa68
3
+ metadata.gz: 51661975b3fe585a7de62a86ef3bdd470999cf9d
4
+ data.tar.gz: d47b8fc50a340c0effa99b2d19f2bf6b460d8531
5
5
  SHA512:
6
- metadata.gz: a93e6367ce746f4c1fba78e8ca91e035b9f3f9624316f329c1f5640415649816dfcc5608427ec113ac4c66aceb7f3eaed800af0c11a8931ebfc828e0a1931413
7
- data.tar.gz: 24b764ba2d1a15fefe32702567f55cdf49270aaf00c78b6cab50420ebad3b96651d450c210934b8e76e50da2048b14e0b496c4a861ebeb98f4a6d6fedfdac21c
6
+ metadata.gz: 1ad047b74e7063afa1ecf570d94e9522bc3b4da8e671abd72c06a7e318b9dc47c5faac7570b67afbca9ffc1c8b766e973594b241c04c62b16914a26d80d57830
7
+ data.tar.gz: 6801060d336d6ba4d605797cf32ad6f5df7be22fd44b41964c22b21c73d6a387e902dc63a6c119ec55f5bbf166179c93b471342fd91a33254179ad83567dc812
@@ -18,14 +18,13 @@ matrix:
18
18
  - rvm: jruby-head
19
19
  env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
20
20
  allow_failures:
21
+ - rvm: jruby
21
22
  - rvm: jruby-head
22
- env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false'
23
23
  - rvm: ruby-head
24
24
  fast_finish: true
25
25
  notifications:
26
26
  recipients:
27
27
  - timo.roessner@googlemail.com
28
28
  - matijs@matijs.net
29
- - emil.rehnberg@gmail.com
30
29
  - chastell@chastell.net
31
30
  irc: "irc.freenode.org#reek"
@@ -1,70 +1,84 @@
1
- == 3.1
1
+ # Change log
2
+
3
+ ## Unreleased
4
+
5
+ ## 3.2.0 (2015-08-17)
6
+
7
+ * (mvz) Detect attribute writers created with `attr` in Attribute smell
8
+ * (beanieboi) Report `attr_writer` and `attr_accessor` in Attribute smell
9
+ * (troessner) Update TooManyInstanceVariables default from 9 to 4
10
+
11
+ ## 3.1.0 (2015-07-21)
2
12
 
3
13
  * (troessner) Make smells configurable on a directory base
4
14
  * (mvz) Handle modules defined by constant assignment
5
15
  * (mvz) Handle modifier style use of module_function for UtilityFunction
6
16
 
7
- == 3.0.4
17
+ ## 3.0.4 (2015-07-10)
8
18
 
9
19
  * (troessner) Fix wiki-link cli option.
20
+ * (troessner) Recognize singleton methods defined via module function.
21
+ * (chastell) Report all envious lines for FeatureEnvy
22
+ * (mvz) Report IrresponsibleModule for modules in addition to classes
23
+ * (mvz) Do not report IrresponsibleModule for namespace modules
10
24
 
11
- == 3.0.3
25
+ ## 3.0.3 (2015-07-04)
12
26
 
13
27
  * (troessner) Fix finding sources when using just the current directory.
14
28
 
15
- == 3.0.2
29
+ ## 3.0.2 (2015-07-03)
16
30
 
17
- * (troessner) Only use ruby source files.
31
+ * (troessner) Only use Ruby source files.
18
32
 
19
- == 3.0.1
33
+ ## 3.0.1 (2015-07-03)
20
34
 
21
35
  * (troessner) Fix reek descending into hidden directories
22
36
 
23
- == 3.0.0
37
+ ## 3.0.0 (2015-06-30)
24
38
 
25
39
  * (troessner) Make directories excludable via configuration.
26
40
  * (mvz) Define and document public API
27
41
  * (troessner) Recognize methods defined with class << self syntax as singleton methods.
28
- * (troessner) Use ruby22 instead of ruby21 for parsing.
42
+ * (troessner) Use Ruby22 instead of Ruby21 for parsing.
29
43
  * (nTraum) Drop support for Ruby 1.9
30
44
 
31
- == 2.2.1
45
+ ## 2.2.1 (2015-05-11)
32
46
 
33
47
  * (mvz) Support methods using array decomposition arguments
34
48
 
35
- == 2.2.0
49
+ ## 2.2.0 (2015-05-09)
36
50
 
37
51
  * (sauliusgrigaitis) Add support for XML reports
38
52
  * (beanieboi) Don’t track private methods in the Attributes smell
39
53
  * (Sebastian Boehm) Do not enable colorization if stdout is not a TTY
40
54
 
41
- == 2.1.0
55
+ ## 2.1.0 (2015-04-17)
42
56
 
43
57
  * (mvz) Ensure require 'reek' is enough to use reek's classes
44
58
  * (mvz) Pick config file that comes first alphabetically
45
59
  * (mvz) Separate FeatureEnvy and UtilityFunction
46
60
 
47
- == 2.0.4
61
+ ## 2.0.4 (2015-04-07)
48
62
 
49
63
  * (chastell) Recognise .reek as a valid configuration file
50
64
 
51
- == 2.0.3
65
+ ## 2.0.3 (2015-04-06)
52
66
 
53
67
  * (mvz) Make NestedIterators handle super with arguments
54
68
  * (mvz) Handle shadow block arguments
55
69
  * (CoralineAda) Allow all formatters to support -U (wiki links)
56
70
  * (tuexss) Make defaults transparent in help message
57
71
 
58
- == 2.0.2
72
+ ## 2.0.2 (2015-03-15)
59
73
 
60
74
  * (troessner) Fix version command
61
75
 
62
- == 2.0.1
76
+ ## 2.0.1 (2015-03-03)
63
77
 
64
78
  * (leonelgalan) Add support for json reports
65
79
  * (chastell) Escape Regexp-like Strings on CodeContext matches (Bug https://github.com/troessner/reek/pull/397)
66
80
 
67
- == 2.0.0
81
+ ## 2.0.0 (2015-02-09)
68
82
 
69
83
  * (troessner) Revise, improve & refactor our Rspec matcher and remove smell_of
70
84
  * (guilhermesimoes) Fix generating HTML report
@@ -73,144 +87,157 @@
73
87
  * (marcofognog) Make NestedIterator not break if iterator is called on super
74
88
  * (troessner) Revamp & refactor our rake task
75
89
 
76
- == 1.6.3
90
+ ## 1.6.3 (2015-01-15)
77
91
 
78
- * (mvz) Support ruby 2.2
92
+ * (mvz) Support Ruby 2.2
79
93
 
80
- == 1.6.2
94
+ ## 1.6.2 (2015-01-13)
81
95
 
82
96
  * (mvz) Fix rake task bug when no config file was given explicitly.
83
97
  * (troessner) Run on working directory when no source is given.
84
98
 
85
- == 1.6.1
99
+ ## 1.6.1 (2014-12-20)
86
100
 
87
101
  * (mvz) Fix regression in rake task: Provide alias for backward compatibility
88
102
 
89
- == 1.6.0
103
+ ## 1.6.0 (2014-12-27)
90
104
 
91
105
  * (troessner) Revise configuration handling:
92
106
  Now there are 3 ways of passing reek a configuration file:
93
107
  - Using the cli "-c" switch
94
108
  - Having a file ending with .reek either in your current working directory or in a parent directory (more on that later)
95
109
  - Having a file ending with .reek in your HOME directory
96
- The order in which reek tries to find such a configuration file is exactly like above: First reek checks if we have given it a configuration file explicitly via CLI. Then it checks the current working directory for a file and if it can't find one, it traverses up the directories until it hits the root directory. And lastly, it checks your HOME directory.
97
- As soon as reek detects a configuration file it stops searching immediately, meaning that from reek's point of view there exists one configuration file and one configuration only regardless of how many ".reek" files you might have on your filesystem.
110
+
111
+ The order in which reek tries to find such a configuration file is exactly
112
+ like above: First reek checks if we have given it a configuration file
113
+ explicitly via CLI. Then it checks the current working directory for a file and
114
+ if it can't find one, it traverses up the directories until it hits the root
115
+ directory. And lastly, it checks your HOME directory. As soon as reek detects a
116
+ configuration file it stops searching immediately, meaning that from reek's
117
+ point of view there exists one configuration file and one configuration only
118
+ regardless of how many ".reek" files you might have on your filesystem.
98
119
  * (chastell) Add keyword arguments support after switching to 'parser'
99
120
  * (mvz) Handle nil-block in iterators
100
121
 
101
- == 1.5.0
122
+ ## 1.5.1 (2014-12-05)
123
+
124
+ * (mvz) Fix support for empty block in NestedIterators
125
+ * (mvz) Update minimum required Ruby version to 1.9.3
126
+ * (chastell) Fix support for required keyword arguments
127
+
128
+ ## 1.5.0 (2014-12-01)
102
129
 
103
- * (mvz) Parse with the parse gem
130
+ * (mvz) Parse with the parser gem
104
131
  * (mvz) Add ModuleInitialize smell
105
132
 
106
- == 1.4.0
133
+ ## 1.4.0 (2014-11-09)
107
134
 
108
135
  * (Gilles Leblanc) Corrects UnusedParameter with keyword arguments with splat
109
136
  * (mvz) Consider block parameter for DuplicateMethodCall
110
137
  * (mvz) Add support for detecting specific smells
111
138
  * (troessner) Add ultra verbose warning formatter.
112
139
 
113
- == 1.3.8
140
+ ## 1.3.8 (2014-07-07)
114
141
 
115
142
  * Internal improvements
116
143
 
117
- == 1.3.7
144
+ ## 1.3.7 (2014-03-25)
118
145
 
119
146
  * (gilles-leblanc) Add color to reek's output
120
147
  * (mvz) Ignore unused parameters if method calls super in nested context
121
148
  * (mvz) Only mark parameters uncommunicative if used
122
149
 
123
- == 1.3.6
150
+ ## 1.3.6 (2013-12-29)
124
151
 
125
152
  * (troessner) Add `Prima Donna Method` smell
126
153
 
127
- == 1.3.5
154
+ ## 1.3.5 (2013-12-23)
128
155
 
129
156
  * (troessner) Allow sorting by issue count
130
157
  * (mvz) Improve cli options
131
158
 
132
- == 1.3.4
159
+ ## 1.3.4 (2013-10-14)
133
160
 
134
161
  * (apiology) Add --single-line option for reporting
135
162
  * (gilles-leblanc) Allow config files to override default config values
136
163
  * (gilles-leblanc) Added line numbers by default when you run the reek command
137
164
  * (mvz) Support Ruby 2.0 syntax
138
165
 
139
- == 1.3.3
166
+ ## 1.3.3 (2013-08-27)
140
167
 
141
168
  * (bf4) Loosen ruby_parser version dependency
142
169
  * (gilles-leblanc) Added total warning count
143
170
 
144
- == 1.3.2
171
+ ## 1.3.2 (2013-08-09)
145
172
 
146
173
  * (mvz) Allow duplicate calls to variable-like methods
147
174
  * (mvz) Improve NestedIterators smell detector
148
175
  * (mvz) Make combination of -n and -q options work
149
176
 
150
- == 1.3.1
177
+ ## 1.3.1 (2013-02-02)
151
178
 
152
179
  * (EmilRehnberg) Added smell for nil checks
153
180
  * (geoffharcourt) Updated dependencies to use ruby2ruby 2.0.2 and ruby_parser 3.1.1
154
181
  * (EmilRehnberg) Added command-line option for printing line numbers with the smell lines
155
182
 
156
- == 1.3
183
+ ## 1.3 (2013-01-19)
157
184
 
158
185
  * (mvz) Use new ruby_parser 3 and friends
159
186
  * (EmilRehnberg) Unused parameter smell added
160
187
  * (dkubb) Fix problem with IrresponsibleModule flagging the same module twice
161
188
 
162
- == 1.2.13 (2012-12-07)
189
+ ## 1.2.13 (2012-12-07)
163
190
 
164
191
  * (mvz) Update to rspec2.
165
- * (petrjanda) Fix undefined method `chr' on an instance of String on Rubinius
192
+ * (petrjanda) Fix undefined method `chr` on an instance of String on Rubinius
166
193
 
167
- == 1.2.12 (2012-06-09)
194
+ ## 1.2.12 (2012-06-09)
168
195
 
169
196
  * (mvz) Use ripper_ruby_parser on Ruby 1.9.3 and up (thus making reek able
170
197
  to parse the new 1.9 hash syntax).
171
198
 
172
- == 1.2.11 (2012-06-08)
199
+ ## 1.2.11 (2012-06-08)
173
200
 
174
201
  * (mvz) Make Bundler a development dependency.
175
202
 
176
- == 1.2.10 (2012-06-05)
203
+ ## 1.2.10 (2012-06-05)
177
204
 
178
205
  * (troessner) Use bundler rake tasks.
179
206
 
180
- == 1.2.9 (2012-06-05)
207
+ ## 1.2.9 (2012-06-05)
181
208
 
182
209
  * (marktabler) Allow single underscore as a variable assignment without triggering UncommunicativeVariableName.
183
210
 
184
- == 1.2.8 (2010-04-26)
211
+ ## 1.2.8 (2010-04-26)
185
212
 
186
- === Major Changes
213
+ ### Major Changes
187
214
  * Smell detectors can be configured or disabled in code comments
188
- ** Comment with :reek:smell_name disables the named smell for a class, module or method
189
- ** Comment with :reek:smell_name:{...} for more detailed configuration
215
+ * Comment with `:reek:smell_name` disables the named smell for a class, module or method
216
+ * Comment with `:reek:smell_name:{...}` for more detailed configuration
190
217
  * Additional config file(s) can be specified:
191
- ** on the command-line using -c
192
- ** via Reek::Rake::Task in the rakefile
218
+ * on the command-line using -c
219
+ * via Reek::Rake::Task in the rakefile
193
220
 
194
- === Minor Changes
221
+ ### Minor Changes
195
222
  * Duplication can be configured to ignore specific calls
196
223
  * IrresponsibleModule now reports scoped module names correctly (#66)
197
224
  * NestedIterators is now more configurable:
198
- ** Option to specify permitted nesting depth (#14)
199
- ** Option to ignore certain iterator methods
225
+ * Option to specify permitted nesting depth (#14)
226
+ * Option to ignore certain iterator methods
200
227
 
201
- == 1.2.7.3 (2010-03-29)
228
+ ## 1.2.7.3 (2010-03-29)
202
229
 
203
- === Minor Changes
230
+ ### Minor Changes
204
231
  * UtilityFunction no longer reported when local method called in param initializer (#60)
205
232
  * Spaces removed from smell class names in report output
206
233
  * Masked smells are no longer reported
207
- ** the -a command-line option has been removed
208
- ** some methods on Examiner are now deprecated
234
+ * the -a command-line option has been removed
235
+ * some methods on Examiner are now deprecated
209
236
  * DataClump no longer needs infinite memory for large classes (#57 again)
210
237
 
211
- == 1.2.7.2 (2010-03-05)
238
+ ## 1.2.7.2 (2010-03-05)
212
239
 
213
- === Minor Changes
240
+ ### Minor Changes
214
241
  * Number of masked smells is no longer shown in report headers
215
242
  * Masked smells are no longer listed in --yaml reports
216
243
  * DataClump no longer needs infinite memory for large classes (#57)
@@ -218,20 +245,20 @@
218
245
  * UncommunicativeMethodName now accepts operator names (+, -, ...)
219
246
  * Uncommunicative Name now warns about uppercase letters in method & var names
220
247
 
221
- == 1.2.7.1 (2010-02-03)
248
+ ## 1.2.7.1 (2010-02-03)
222
249
 
223
- === Minor Changes
250
+ ### Minor Changes
224
251
  * Fixed crash on a case statement with no condition (#58)
225
252
 
226
- == 1.2.7 (2010-02-01)
253
+ ## 1.2.7 (2010-02-01)
227
254
 
228
- === Major Changes
255
+ ### Major Changes
229
256
  * New option --yaml reports smells in YAML format
230
257
  * Now require 'reek/rake/task' to use the rake task
231
258
  * Now require 'reek/spec' to use the Rspec matchers
232
259
  * Developer API completely revised and documented
233
260
 
234
- === Minor Changes
261
+ ### Minor Changes
235
262
  * New smell: Irresponsible Module (has no meaningful comment)
236
263
  * ControlCouple no longer checks arguments yielded to blocks
237
264
  * FeatureEnvy and UtilityFunction are now subclasses of a new smell: LowCohesion
@@ -243,27 +270,27 @@
243
270
 
244
271
  See http://wiki.github.com/kevinrutherford/reek for further details.
245
272
 
246
- == 1.2.6 (2009-11-28)
273
+ ## 1.2.6 (2009-11-28)
247
274
 
248
- === Minor Changes
275
+ ### Minor Changes
249
276
  * Corrected display of module methods to use # (#56)
250
277
 
251
- == 1.2.5 (2009-11-19)
278
+ ## 1.2.5 (2009-11-19)
252
279
 
253
- === Minor Changes
280
+ ### Minor Changes
254
281
  * Ignores ruby_parser errors and pretends the offending file was empty
255
282
 
256
- == 1.2.4 (2009-11-17)
283
+ ## 1.2.4 (2009-11-17)
257
284
 
258
- === Major Changes
285
+ ### Major Changes
259
286
  * The -f, -c and -s options for formatting smell warnings have been removed
260
287
 
261
- === Minor Changes
288
+ ### Minor Changes
262
289
  * ControlCouple now warns about parameters defaulted to true/false
263
290
 
264
- == 1.2.3 (2009-11-2)
291
+ ## 1.2.3 (2009-11-2)
265
292
 
266
- === Minor Changes
293
+ ### Minor Changes
267
294
  * New smell: Attribute (disabled by default)
268
295
  * Expanded DataClump to check modules (#9)
269
296
  * Fixed LargeClass to ignore inner classes and modules
@@ -271,109 +298,109 @@ See http://wiki.github.com/kevinrutherford/reek for further details.
271
298
  * Removed support for MyClass.should_not reek due to ParseTree EOL
272
299
  * Removed internal requiring of 'rubygems'
273
300
 
274
- == 1.2.1 (2009-10-02)
301
+ ## 1.2.1 (2009-10-02)
275
302
 
276
- === Minor Changes
303
+ ### Minor Changes
277
304
  * New smell: Class Variable
278
305
 
279
306
  See http://wiki.github.com/kevinrutherford/reek for details
280
307
 
281
- == 1.2 2009-09-20
308
+ ## 1.2 2009-09-20
282
309
 
283
- === Major Changes
284
- * Reek passes all its tests under ruby 1.8.6, 1.8.7 and 1.9.1 (fixed #16)
310
+ ### Major Changes
311
+ * Reek passes all its tests under Ruby 1.8.6, 1.8.7 and 1.9.1 (fixed #16)
285
312
  * New smell -- Data Clump:
286
- ** Looks within a class for 3 or more methods taking the same 2 or more parameters
313
+ * Looks within a class for 3 or more methods taking the same 2 or more parameters
287
314
  * New smell -- Simulated Polymorphism:
288
- ** Currently only performs basic check for multiple tests of same value
315
+ * Currently only performs basic check for multiple tests of same value
289
316
  * Reek's output reports are now formatted differently:
290
- ** Reek is no longer silent about smell-free source code
291
- ** Output now reports on all files examined, even if they have no smells
292
- ** Smell warnings are indented in the report; file summary headers are not
293
- ** Reports for multiple sources are run together; no more blank lines
294
- ** Reports in spec matcher failures are quiet (fixed #38)
295
- * The smells masked by *.reek config files can now be seen:
296
- ** The header for each source file now counts masked smells
297
- ** The --show-all (-a) option shows masked warnings in the report
317
+ * Reek is no longer silent about smell-free source code
318
+ * Output now reports on all files examined, even if they have no smells
319
+ * Smell warnings are indented in the report; file summary headers are not
320
+ * Reports for multiple sources are run together; no more blank lines
321
+ * Reports in spec matcher failures are quiet (fixed #38)
322
+ * The smells masked by `*.reek` config files can now be seen:
323
+ * The header for each source file now counts masked smells
324
+ * The --show-all (-a) option shows masked warnings in the report
298
325
  * The spec matchers are now accessed by requiring 'reek/adapters/spec'
299
326
 
300
- === Minor Changes
327
+ ### Minor Changes
301
328
  * Reek's RDoc is now hosted at http://rdoc.info/projects/kevinrutherford/reek
302
- * If a dir is passed on the command-line all **/*.rb files below it are examined (fixed #41)
329
+ * If a dir is passed on the command-line all `**/*.rb` files below it are examined (fixed #41)
303
330
  * Duplication warnings now report the number of identical calls
304
331
  * FeatureEnvy no longer ignores :self when passed as a method parameter
305
332
  * LargeClass is disabled when checking in-memory classes (fixed #28)
306
333
  * LongParameterList accepts upto 5 parameters for #initialize methods
307
334
  * Several changes to the LongMethod counting algorithm:
308
- ** LongMethod now counts statements deeper into each method (fixed #25)
309
- ** LongMethod no longer counts control structures, only their contained stmts
310
- ** See http://wiki.github.com/kevinrutherford/reek/long-method for details
335
+ * LongMethod now counts statements deeper into each method (fixed #25)
336
+ * LongMethod no longer counts control structures, only their contained stmts
337
+ * See http://wiki.github.com/kevinrutherford/reek/long-method for details
311
338
  * UncommunicativeName warns about any name ending in a number (fixed #18)
312
339
  * UtilityFunction has been relaxed somewhat:
313
- ** no longer reports methods that call 'super' (fixed #39)
314
- ** no longer reports simple helper methods
315
- ** can be configured based on number of calls out
340
+ * no longer reports methods that call 'super' (fixed #39)
341
+ * no longer reports simple helper methods
342
+ * can be configured based on number of calls out
316
343
  * Now reports an error for corrupt config files
317
344
  * Empty config files are ignored
318
345
  * Smells can be configured with scope-specific overrides for any config item
319
346
 
320
347
 
321
- == 1.1.3 2009-05-19
348
+ ## 1.1.3 2009-05-19
322
349
 
323
- === Minor Changes
350
+ ### Minor Changes
324
351
  * No longer depends directly on the sexp_processor gem
325
352
 
326
- === Fixes
353
+ ### Fixes
327
354
  * LargeClass now relies only on the given source code (fixed #26)
328
355
 
329
- == 1.1.2 2009-05-18
356
+ ## 1.1.2 2009-05-18
330
357
 
331
- === Major Enhancements
358
+ ### Major Enhancements
332
359
  * Switched from ParseTree to ruby_parser for source code parsing
333
360
  * 'MyClass.should_not reek' now only possible if ParseTree gem installed
334
361
 
335
- == 1.1.1 2009-05-08
362
+ ## 1.1.1 2009-05-08
336
363
 
337
- === Minor enhancements
364
+ ### Minor enhancements
338
365
  * LargeClass now also warns about any class with > 9 instance variables (fixed #6)
339
366
  * Now depends on ruby2ruby, to display code better
340
367
  * Duplication notices more repeated method calls
341
368
  * Smells within blocks are now reported better
342
369
 
343
- == 1.1.0 2009-04-10
370
+ ## 1.1.0 2009-04-10
344
371
 
345
- === Minor enhancements
372
+ ### Minor enhancements
346
373
  * Now possible to write 'MyClass.should_not reek' (fixed #33)
347
374
 
348
- === Fixes
375
+ ### Fixes
349
376
  * Now counts attr assignments ([]= etc) in feature envy calculations
350
- * Doesn't attempt to find *.reek files when reading code from stdin
377
+ * Doesn't attempt to find `*.reek` files when reading code from stdin
351
378
 
352
- == 1.0.1 2009-04-06
379
+ ## 1.0.1 2009-04-06
353
380
 
354
- === Fixes
381
+ ### Fixes
355
382
  * Dir[...].to_source now creates a Report that can be browsed (fixed #36)
356
383
 
357
- == 1.0.0 2009-04-05
384
+ ## 1.0.0 2009-04-05
358
385
 
359
- === Major enhancements
360
- * Use *.reek files in source tree to configure Reek's behaviour
386
+ ### Major enhancements
387
+ * Use `*.reek` files in source tree to configure Reek's behaviour
361
388
  * Added -f option to configure report format
362
389
  * --sort_order replaced by -f, -c and -s
363
390
  * Matchers provided for rspec; eg. foo.should_not reek
364
391
 
365
- === Minor enhancements
392
+ ### Minor enhancements
366
393
  * Smells in singleton methods are now analysed
367
394
  * Uncommunicative parameter names in blocks now reported
368
395
  * Modules and blocks now reflected in scope of smell reports
369
396
 
370
- === Fixes
397
+ ### Fixes
371
398
  * Corrected false reports of long arg lists to yield
372
399
  * A method can now be a UtilityFunction only when it includes a call
373
400
 
374
- == 0.3.1 2008-11-17
401
+ ## 0.3.1 2008-11-17
375
402
 
376
- === Minor enhancements
403
+ ### Minor enhancements
377
404
  * Uncommunicative Name now checks instance variables more thoroughly
378
405
  * Uncommunicative Name now warns about names of the form 'x2'
379
406
  * Added check for duplicated calls within a method
@@ -381,20 +408,20 @@ See http://wiki.github.com/kevinrutherford/reek for details
381
408
  * Added rdoc comments explaining what each smell is about
382
409
  * Chained iterators are no longer mis-reported as nested
383
410
 
384
- == 0.3.0 2008-11-02
411
+ ## 0.3.0 2008-11-02
385
412
 
386
- === Minor enhancements
413
+ ### Minor enhancements
387
414
  * New smell: first naive checks for Control Couple
388
415
  * reek now only checks sources passed on the command line
389
416
  * Code snippets can be supplied on the commandline
390
417
  * Added headings and warnings count when smells in multiple files
391
418
  * Added Reek::RakeTask to run reek from rakefiles
392
419
 
393
- === Fixes
420
+ ### Fixes
394
421
  * Fixed: Returns exit status 2 when smells are reported
395
422
  * Fixed: no longer claims an empty method is a Utility Function
396
423
 
397
- == 0.2.3 2008-09-22
424
+ ## 0.2.3 2008-09-22
398
425
 
399
426
  * Minor enhancements:
400
427
  * Only reports Feature Envy when the method isn't a Utility Function
@@ -405,24 +432,24 @@ See http://wiki.github.com/kevinrutherford/reek for details
405
432
  * Fixed: displaying the receiver of many more kinds of Feature Envy
406
433
  * Fixed: Large Class calculation for Object
407
434
 
408
- == 0.2.2 2008-09-15
435
+ ## 0.2.2 2008-09-15
409
436
 
410
437
  * Tweaks:
411
438
  * Fixed --version!
412
439
 
413
- == 0.2.1 2008-09-14
440
+ ## 0.2.1 2008-09-14
414
441
 
415
442
  * Tweaks:
416
443
  * Now works from the source code, instead of requiring each named file
417
444
  * Added integration tests that run reek on a couple of gems
418
445
 
419
- == 0.2.0 2008-09-10
446
+ ## 0.2.0 2008-09-10
420
447
 
421
448
  * Minor enhancements:
422
449
  * Added --help, --version options
423
450
  * Added --sort option to sort the report by smell or by code location
424
451
 
425
- == 0.1.1 2008-09-09
452
+ ## 0.1.1 2008-09-09
426
453
 
427
454
  * Some tweaks:
428
455
  * Fixed report printing for Feature Envy when the receiver is a block
@@ -430,7 +457,7 @@ See http://wiki.github.com/kevinrutherford/reek for details
430
457
  * Fixed: Long Method now reports the total length of the method
431
458
  * Fixed: each smell reported only once
432
459
 
433
- == 0.1.0 2008-09-09
460
+ ## 0.1.0 2008-09-09
434
461
 
435
462
  * 1 minor enhancement:
436
463
  * Added a check for nested iterators within a method
@@ -439,7 +466,7 @@ See http://wiki.github.com/kevinrutherford/reek for details
439
466
  * Split some of the specs into more meaningful chunks
440
467
  * Updated the rakefile so that rcov is no longer the default
441
468
 
442
- == 0.0.1 2008-09-08
469
+ ## 0.0.1 2008-09-08
443
470
 
444
471
  * 1 major enhancement:
445
472
  * Initial release