reek 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ [Long Method] C#build has approx 61 statements
2
+ [Nested Iterators] C#build has nested iterators
3
+ [Feature Envy] C#build uses io more than self
4
+ [Uncommunicative Name] C#build uses the local variable name 't'
5
+ [Uncommunicative Name] C#c uses the method name 'c'
6
+ [Feature Envy] C#crap_for_windoze uses Config::CONFIG more than self
7
+ [Long Method] C#generate has approx 33 statements
8
+ [Feature Envy] C#initialize uses stack more than self
9
+ [Long Method] C#load_cache has approx 7 statements
10
+ [Long Method] C#module_name has approx 6 statements
11
+ [Nested Iterators] C#module_name has nested iterators
12
+ [Feature Envy] C#module_name uses md5 more than self
13
+ [Long Method] C#parse_signature has approx 15 statements
14
+ [Utility Function] C#strip_comments doesn't depend on instance state
15
+ [Large Class] Dir has 31 methods
16
+ [Large Class] Module has 34 methods
17
+ [Long Method] Module#inline has approx 12 statements
@@ -2,10 +2,7 @@
2
2
  [Long Method] AmbiguousArgument#options has approx 6 statements
3
3
  [Long Parameter List] CompletingHash#complete has 4 parameters
4
4
  [Nested Iterators] CompletingHash#complete has nested iterators
5
- [Feature Envy] CompletingHash#environment uses :env more than self
6
5
  [Long Method] CompletingHash#getopts has approx 17 statements
7
- [Long Method] CompletingHash#initialize has approx 8 statements
8
- [Feature Envy] CompletingHash#load uses :File and :filename more than self
9
6
  [Long Method] CompletingHash#make_switch has approx 69 statements
10
7
  [Nested Iterators] CompletingHash#make_switch has nested iterators
11
8
  [Uncommunicative Name] CompletingHash#make_switch uses the local variable name 'a'
@@ -14,42 +11,39 @@
14
11
  [Uncommunicative Name] CompletingHash#make_switch uses the local variable name 'q'
15
12
  [Uncommunicative Name] CompletingHash#make_switch uses the local variable name 's'
16
13
  [Nested Iterators] CompletingHash#match has nested iterators
17
- [Feature Envy] CompletingHash#order uses :argv more than self
18
- [Feature Envy] CompletingHash#parse uses :argv more than self
14
+ [Feature Envy] CompletingHash#order uses argv more than self
15
+ [Feature Envy] CompletingHash#parse uses argv more than self
19
16
  [Long Method] CompletingHash#parse_in_order has approx 31 statements
20
17
  [Nested Iterators] CompletingHash#parse_in_order has nested iterators
21
- [Feature Envy] CompletingHash#permute uses :argv more than self
22
- [Feature Envy] CompletingHash#permute! uses :arg more than self
18
+ [Feature Envy] CompletingHash#permute uses argv more than self
23
19
  [Long Parameter List] CompletingHash#summarize has 4 parameters
24
20
  [Uncommunicative Name] CompletingHash#ver uses the local variable name 'v'
25
- [Feature Envy] CompletingHash#visit uses :el more than self
26
- [Feature Envy] List#accept uses :pat more than self
21
+ [Feature Envy] List#accept uses pat more than self
27
22
  [Uncommunicative Name] List#accept uses the parameter name 't'
28
- [Feature Envy] List#add_banner uses :opt more than self
23
+ [Feature Envy] List#add_banner uses opt more than self
29
24
  [Long Parameter List] List#complete has 4 parameters
25
+ [Feature Envy] List#initialize uses OptionMap more than self
30
26
  [Uncommunicative Name] List#reject uses the parameter name 't'
31
- [Feature Envy] List#summarize uses :opt more than self
27
+ [Feature Envy] List#summarize uses opt more than self
32
28
  [Long Parameter List] List#update has 5 parameters
33
29
  [Long Method] List#update has approx 6 statements
34
- [Feature Envy] List#update uses :o more than self
35
30
  [Uncommunicative Name] List#update uses the local variable name 'o'
36
31
  [Long Method] OptionParser#complete has approx 23 statements
37
- [Feature Envy] OptionParser#complete uses :candidates and :k more than self
32
+ [Feature Envy] OptionParser#complete uses candidates more than self
38
33
  [Uncommunicative Name] OptionParser#complete uses the local variable name 'k'
39
34
  [Uncommunicative Name] OptionParser#complete uses the local variable name 'v'
40
35
  [Utility Function] OptionParser#convert doesn't depend on instance state
41
36
  [Long Method] PlacedArgument#parse has approx 6 statements
42
- [Feature Envy] PlacedArgument#parse uses :val more than self
43
37
  [Uncommunicative Name] Switch#add_banner uses the local variable name 's'
44
38
  [Long Parameter List] Switch#initialize has 7 parameters
45
39
  [Long Method] Switch#parse_arg has approx 12 statements
46
- [Feature Envy] Switch#parse_arg uses :m and :s more than self
40
+ [Feature Envy] Switch#parse_arg uses arg more than self
47
41
  [Uncommunicative Name] Switch#parse_arg uses the local variable name 'm'
48
42
  [Uncommunicative Name] Switch#parse_arg uses the local variable name 's'
49
43
  [Long Parameter List] Switch#summarize has 5 parameters
50
44
  [Long Method] Switch#summarize has approx 27 statements
51
45
  [Nested Iterators] Switch#summarize has nested iterators
52
- [Feature Envy] Switch#summarize uses :s more than self
46
+ [Feature Envy] Switch#summarize uses left more than self
53
47
  [Uncommunicative Name] Switch#summarize uses the local variable name 'l'
54
48
  [Uncommunicative Name] Switch#summarize uses the local variable name 'r'
55
49
  [Uncommunicative Name] Switch#summarize uses the local variable name 's'
@@ -1,38 +1,26 @@
1
- [Feature Envy] RedCloth#block_markdown_atx uses :blk and :cont and :text more than self
2
1
  [Long Method] RedCloth#block_markdown_bq has approx 6 statements
3
2
  [Utility Function] RedCloth#block_markdown_lists doesn't depend on instance state
4
3
  [Utility Function] RedCloth#block_markdown_rule doesn't depend on instance state
5
- [Feature Envy] RedCloth#block_markdown_rule uses :text more than self
6
- [Feature Envy] RedCloth#block_markdown_setext uses :blk and :cont and :text more than self
7
4
  [Long Method] RedCloth#block_textile_lists has approx 21 statements
8
5
  [Nested Iterators] RedCloth#block_textile_lists has nested iterators
9
- [Feature Envy] RedCloth#block_textile_lists uses :depth more than self
6
+ [Feature Envy] RedCloth#block_textile_lists uses depth more than self
10
7
  [Long Method] RedCloth#block_textile_table has approx 19 statements
11
8
  [Nested Iterators] RedCloth#block_textile_table has nested iterators
12
9
  [Long Method] RedCloth#blocks has approx 17 statements
13
10
  [Nested Iterators] RedCloth#blocks has nested iterators
14
- [Feature Envy] RedCloth#blocks uses :blk more than self
15
11
  [Utility Function] RedCloth#clean_html doesn't depend on instance state
16
12
  [Long Method] RedCloth#clean_html has approx 14 statements
17
13
  [Nested Iterators] RedCloth#clean_html has nested iterators
18
- [Feature Envy] RedCloth#clean_html uses :raw and :tags more than self
19
14
  [Long Method] RedCloth#clean_white_space has approx 7 statements
20
- [Feature Envy] RedCloth#clean_white_space uses :text more than self
15
+ [Feature Envy] RedCloth#clean_white_space uses text more than self
21
16
  [Utility Function] RedCloth#flush_left doesn't depend on instance state
22
- [Feature Envy] RedCloth#flush_left uses :indt more than self
23
17
  [Utility Function] RedCloth#footnote_ref doesn't depend on instance state
24
- [Feature Envy] RedCloth#footnote_ref uses :text more than self
25
18
  [Long Method] RedCloth#glyphs_textile has approx 9 statements
26
- [Feature Envy] RedCloth#glyphs_textile uses :codepre more than self
27
19
  [Utility Function] RedCloth#h_align doesn't depend on instance state
28
- [Feature Envy] RedCloth#h_align uses :H_ALGN_VALS more than self
29
20
  [Utility Function] RedCloth#htmlesc doesn't depend on instance state
30
- [Feature Envy] RedCloth#htmlesc uses :str more than self
31
21
  [Utility Function] RedCloth#incoming_entities doesn't depend on instance state
32
- [Feature Envy] RedCloth#incoming_entities uses :text more than self
33
22
  [Nested Iterators] RedCloth#inline has nested iterators
34
23
  [Long Method] RedCloth#inline_markdown_link has approx 6 statements
35
- [Feature Envy] RedCloth#inline_markdown_link uses :text more than self
36
24
  [Long Method] RedCloth#inline_markdown_reflink has approx 7 statements
37
25
  [Long Method] RedCloth#inline_textile_image has approx 16 statements
38
26
  [Long Method] RedCloth#inline_textile_link has approx 9 statements
@@ -40,15 +28,14 @@
40
28
  [Nested Iterators] RedCloth#inline_textile_span has nested iterators
41
29
  [Utility Function] RedCloth#lT doesn't depend on instance state
42
30
  [Utility Function] RedCloth#no_textile doesn't depend on instance state
43
- [Feature Envy] RedCloth#no_textile uses :text more than self
44
31
  [Long Method] RedCloth#pba has approx 22 statements
45
- [Feature Envy] RedCloth#pba uses :style and :text more than self
32
+ [Feature Envy] RedCloth#pba uses style and text more than self
46
33
  [Long Method] RedCloth#rip_offtags has approx 22 statements
47
- [Feature Envy] RedCloth#rip_offtags uses :codepre more than self
34
+ [Feature Envy] RedCloth#rip_offtags uses codepre more than self
35
+ [Feature Envy] RedCloth#shelve uses @shelf more than self
36
+ [Feature Envy] RedCloth#smooth_offtags uses @pre_list more than self
48
37
  [Long Parameter List] RedCloth#textile_bq has 4 parameters
49
38
  [Long Parameter List] RedCloth#textile_fn_ has 5 parameters
50
- [Feature Envy] RedCloth#textile_fn_ uses :atts more than self
51
39
  [Long Parameter List] RedCloth#textile_p has 4 parameters
52
40
  [Long Method] RedCloth#to_html has approx 24 statements
53
41
  [Utility Function] RedCloth#v_align doesn't depend on instance state
54
- [Feature Envy] RedCloth#v_align uses :V_ALGN_VALS more than self
data/tasks/samples.rake CHANGED
@@ -1,5 +1,7 @@
1
1
  namespace :samples do
2
+
2
3
  files = Dir['spec/integration/*.rb'] + ['setup.rb']
4
+
3
5
  files.each do |f|
4
6
  fn = File.basename(f)
5
7
  desc "run reek on sample #{fn}"
data/website/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
6
6
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
7
  <title>
8
- Code smell detector
8
+ reek
9
9
  </title>
10
10
  <script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
11
11
  <style>
@@ -30,73 +30,36 @@
30
30
  <body>
31
31
  <div id="main">
32
32
 
33
- <h1>Code smell detector</h1>
33
+ <h1>reek</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/reek"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/reek" class="numbers">0.2.0</a>
36
+ <a href="http://rubyforge.org/projects/reek" class="numbers">0.2.2</a>
37
37
  </div>
38
- <h1>&#x2192; &#8216;reek&#8217;</h1>
39
-
40
-
41
- <h2>What</h2>
42
-
43
-
44
- <p>Reek is a tool that examines Ruby classes, modules and methods and reports any code smells it finds.</p>
45
-
46
-
47
- <h2>Installing</h2>
48
-
49
-
50
- <p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">reek</span></pre></p>
51
-
52
-
53
- <h2>The basics</h2>
54
-
55
-
56
- <p><pre class='syntax'>
57
- <span class="global">$ </span><span class="ident">cd</span> <span class="ident">my_project</span><span class="punct">/</span><span class="ident">lib</span>
58
- <span class="global">$ </span><span class="ident">reek</span>
59
- </pre></p>
60
-
61
-
62
- <p>(See reek&#8212;help for more.)</p>
63
-
64
-
65
- <h2>Code Smells</h2>
66
-
67
-
68
- <p>reek currently includes very naive checks for the following code smells:</p>
69
-
70
-
71
- <ul>
38
+ <p>Reek is a tool that examines Ruby classes, modules and methods and reports any code smells it finds.</p>
39
+ <h2>Installing</h2>
40
+ <code>$ gem install reek</code>
41
+ <h2>The basics</h2>
42
+ <code>$ reek [options] [source_files]</code>
43
+ <p>(See <code>reek --help</code> for details.)</p>
44
+ <h2>Code Smells</h2>
45
+ <p>reek currently includes very naive checks for the following code smells:</p>
46
+ <ul>
72
47
  <li>Long Method</li>
73
- <li>Large Class</li>
74
- <li>Feature Envy</li>
75
- <li>Uncommunicative Name</li>
76
- <li>Long Parameter List</li>
77
- <li>Utility Function</li>
78
- <li>Nested Iterators</li>
79
- </ul>
80
-
81
-
82
- <h2>How to access the source code</h2>
83
-
84
-
85
- <p>The source is hosted on both <a href="http://github.com/kevinrutherford/reek/tree/master">github</a> and <a href="http://rubyforge.org/projects/reek/">rubyforge</a></p>
86
-
87
-
88
- <h2>License</h2>
89
-
90
-
91
- <p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
92
-
93
-
94
- <h2>Contact</h2>
95
-
96
-
97
- <p>Comments are welcome. Send an email to <a href="mailto:kevin@rutherford-software.com">Kevin Rutherford</a></p>
48
+ <li>Large Class</li>
49
+ <li>Feature Envy</li>
50
+ <li>Uncommunicative Name</li>
51
+ <li>Long Parameter List</li>
52
+ <li>Utility Function</li>
53
+ <li>Nested Iterators</li>
54
+ </ul>
55
+ <h2>How to access the source code</h2>
56
+ <p>The source is hosted on both <a href="http://github.com/kevinrutherford/reek/tree/master">github</a> and <a href="http://rubyforge.org/projects/reek/">rubyforge</a></p>
57
+ <h2>License</h2>
58
+ <p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
59
+ <h2>Contact</h2>
60
+ <p>Comments are welcome. Send an email to <a href="mailto:kevin@rutherford-software.com">Kevin Rutherford</a></p>
98
61
  <p class="coda">
99
- <a href="http://www.kevinrutherford.co.uk">Kevin Rutherford</a>, 12th September 2008<br>
62
+ <a href="http://www.kevinrutherford.co.uk">Kevin Rutherford</a>, 15th September 2008<br>
100
63
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
101
64
  </p>
102
65
  </div>
data/website/index.txt CHANGED
@@ -1,24 +1,16 @@
1
- h1. Code smell detector
2
-
3
- h1. &#x2192; 'reek'
4
-
5
-
6
- h2. What
1
+ h1. reek
7
2
 
8
3
  Reek is a tool that examines Ruby classes, modules and methods and reports any code smells it finds.
9
4
 
10
5
  h2. Installing
11
6
 
12
- <pre syntax="ruby">sudo gem install reek</pre>
7
+ @$ gem install reek@
13
8
 
14
9
  h2. The basics
15
10
 
16
- <pre syntax="ruby">
17
- $ cd my_project/lib
18
- $ reek
19
- </pre>
11
+ @$ reek [options] [source_files]@
20
12
 
21
- (See reek --help for more.)
13
+ (See @reek --help@ for details.)
22
14
 
23
15
  h2. Code Smells
24
16
 
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: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Rutherford
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-15 00:00:00 +01:00
12
+ date: 2008-09-22 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -53,6 +53,7 @@ files:
53
53
  - lib/reek/class_checker.rb
54
54
  - lib/reek/file_checker.rb
55
55
  - lib/reek/method_checker.rb
56
+ - lib/reek/object_refs.rb
56
57
  - lib/reek/options.rb
57
58
  - lib/reek/printer.rb
58
59
  - lib/reek/report.rb
@@ -67,11 +68,16 @@ files:
67
68
  - spec/reek/long_parameter_list_spec.rb
68
69
  - spec/reek/method_checker_spec.rb
69
70
  - spec/reek/nested_iterators_spec.rb
71
+ - spec/reek/object_refs_spec.rb
70
72
  - spec/reek/options_spec.rb
73
+ - spec/reek/printer_spec.rb
71
74
  - spec/reek/report_spec.rb
72
75
  - spec/reek/smell_spec.rb
73
76
  - spec/reek/uncommunicative_name_spec.rb
74
77
  - spec/reek/utility_function_spec.rb
78
+ - spec/reek_source_spec.rb
79
+ - spec/samples/inline.rb
80
+ - spec/samples/inline.reek
75
81
  - spec/samples/optparse.rb
76
82
  - spec/samples/optparse.reek
77
83
  - spec/samples/optparse/date.rb