reek 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,54 @@
1
+ [Feature Envy] RedCloth#block_markdown_atx uses :blk and :cont and :text more than self
2
+ [Long Method] RedCloth#block_markdown_bq has approx 6 statements
3
+ [Utility Function] RedCloth#block_markdown_lists doesn't depend on instance state
4
+ [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
+ [Long Method] RedCloth#block_textile_lists has approx 21 statements
8
+ [Nested Iterators] RedCloth#block_textile_lists has nested iterators
9
+ [Feature Envy] RedCloth#block_textile_lists uses :depth more than self
10
+ [Long Method] RedCloth#block_textile_table has approx 19 statements
11
+ [Nested Iterators] RedCloth#block_textile_table has nested iterators
12
+ [Long Method] RedCloth#blocks has approx 17 statements
13
+ [Nested Iterators] RedCloth#blocks has nested iterators
14
+ [Feature Envy] RedCloth#blocks uses :blk more than self
15
+ [Utility Function] RedCloth#clean_html doesn't depend on instance state
16
+ [Long Method] RedCloth#clean_html has approx 14 statements
17
+ [Nested Iterators] RedCloth#clean_html has nested iterators
18
+ [Feature Envy] RedCloth#clean_html uses :raw and :tags more than self
19
+ [Long Method] RedCloth#clean_white_space has approx 7 statements
20
+ [Feature Envy] RedCloth#clean_white_space uses :text more than self
21
+ [Utility Function] RedCloth#flush_left doesn't depend on instance state
22
+ [Feature Envy] RedCloth#flush_left uses :indt more than self
23
+ [Utility Function] RedCloth#footnote_ref doesn't depend on instance state
24
+ [Feature Envy] RedCloth#footnote_ref uses :text more than self
25
+ [Long Method] RedCloth#glyphs_textile has approx 9 statements
26
+ [Feature Envy] RedCloth#glyphs_textile uses :codepre more than self
27
+ [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
+ [Utility Function] RedCloth#htmlesc doesn't depend on instance state
30
+ [Feature Envy] RedCloth#htmlesc uses :str more than self
31
+ [Utility Function] RedCloth#incoming_entities doesn't depend on instance state
32
+ [Feature Envy] RedCloth#incoming_entities uses :text more than self
33
+ [Nested Iterators] RedCloth#inline has nested iterators
34
+ [Long Method] RedCloth#inline_markdown_link has approx 6 statements
35
+ [Feature Envy] RedCloth#inline_markdown_link uses :text more than self
36
+ [Long Method] RedCloth#inline_markdown_reflink has approx 7 statements
37
+ [Long Method] RedCloth#inline_textile_image has approx 16 statements
38
+ [Long Method] RedCloth#inline_textile_link has approx 9 statements
39
+ [Long Method] RedCloth#inline_textile_span has approx 8 statements
40
+ [Nested Iterators] RedCloth#inline_textile_span has nested iterators
41
+ [Utility Function] RedCloth#lT doesn't depend on instance state
42
+ [Utility Function] RedCloth#no_textile doesn't depend on instance state
43
+ [Feature Envy] RedCloth#no_textile uses :text more than self
44
+ [Long Method] RedCloth#pba has approx 22 statements
45
+ [Feature Envy] RedCloth#pba uses :style and :text more than self
46
+ [Long Method] RedCloth#rip_offtags has approx 22 statements
47
+ [Feature Envy] RedCloth#rip_offtags uses :codepre more than self
48
+ [Long Parameter List] RedCloth#textile_bq has 4 parameters
49
+ [Long Parameter List] RedCloth#textile_fn_ has 5 parameters
50
+ [Feature Envy] RedCloth#textile_fn_ uses :atts more than self
51
+ [Long Parameter List] RedCloth#textile_p has 4 parameters
52
+ [Long Method] RedCloth#to_html has approx 24 statements
53
+ [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/rspec.rake CHANGED
@@ -22,12 +22,12 @@ CLEAN.include(REPORT_DIR)
22
22
 
23
23
  desc "runs the specs"
24
24
  Spec::Rake::SpecTask.new(:spec) do |t|
25
- t.spec_files = FileList['spec/**/*.rb']
25
+ t.spec_files = FileList['spec/**/*_spec.rb']
26
26
  end
27
27
 
28
28
  desc "runs the specs and reports coverage in #{REPORT_DIR}"
29
29
  Spec::Rake::SpecTask.new(:spec_rcov) do |t|
30
- t.spec_files = FileList['spec/**/*.rb']
30
+ t.spec_files = FileList['spec/**/*_spec.rb']
31
31
  t.rcov = true
32
32
  t.rcov_dir = REPORT_DIR
33
33
  t.rcov_opts = ['--exclude', 'spec,\.autotest']
@@ -0,0 +1,15 @@
1
+ namespace :samples do
2
+ files = Dir['spec/integration/*.rb'] + ['setup.rb']
3
+ files.each do |f|
4
+ fn = File.basename(f)
5
+ desc "run reek on sample #{fn}"
6
+ task fn do
7
+ sh "ruby -Ilib bin/reek #{f}"
8
+ end
9
+ task :all => fn
10
+ end
11
+
12
+ desc 'run all samples'
13
+ task :all
14
+
15
+ end
data/website/index.html CHANGED
@@ -59,7 +59,7 @@
59
59
  </pre></p>
60
60
 
61
61
 
62
- <p>(More details coming soon&#8230;)</p>
62
+ <p>(See reek&#8212;help for more.)</p>
63
63
 
64
64
 
65
65
  <h2>Code Smells</h2>
@@ -96,7 +96,7 @@
96
96
 
97
97
  <p>Comments are welcome. Send an email to <a href="mailto:kevin@rutherford-software.com">Kevin Rutherford</a></p>
98
98
  <p class="coda">
99
- <a href="http://www.kevinrutherford.co.uk">Kevin Rutherford</a>, 9th September 2008<br>
99
+ <a href="http://www.kevinrutherford.co.uk">Kevin Rutherford</a>, 12th September 2008<br>
100
100
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
101
101
  </p>
102
102
  </div>
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.0
4
+ version: 0.2.1
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-12 00:00:00 +01:00
12
+ date: 2008-09-14 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -51,6 +51,7 @@ files:
51
51
  - lib/reek.rb
52
52
  - lib/reek/checker.rb
53
53
  - lib/reek/class_checker.rb
54
+ - lib/reek/file_checker.rb
54
55
  - lib/reek/method_checker.rb
55
56
  - lib/reek/options.rb
56
57
  - lib/reek/printer.rb
@@ -58,10 +59,12 @@ files:
58
59
  - lib/reek/smells.rb
59
60
  - lib/reek/version.rb
60
61
  - setup.rb
62
+ - spec/integration_spec.rb
61
63
  - spec/reek/class_checker_spec.rb
62
64
  - spec/reek/feature_envy_spec.rb
63
65
  - spec/reek/large_class_spec.rb
64
66
  - spec/reek/long_method_spec.rb
67
+ - spec/reek/long_parameter_list_spec.rb
65
68
  - spec/reek/method_checker_spec.rb
66
69
  - spec/reek/nested_iterators_spec.rb
67
70
  - spec/reek/options_spec.rb
@@ -69,10 +72,19 @@ files:
69
72
  - spec/reek/smell_spec.rb
70
73
  - spec/reek/uncommunicative_name_spec.rb
71
74
  - spec/reek/utility_function_spec.rb
72
- - spec/reek_spec.rb
75
+ - spec/samples/optparse.rb
76
+ - spec/samples/optparse.reek
77
+ - spec/samples/optparse/date.rb
78
+ - spec/samples/optparse/shellwords.rb
79
+ - spec/samples/optparse/time.rb
80
+ - spec/samples/optparse/uri.rb
81
+ - spec/samples/optparse/version.rb
82
+ - spec/samples/redcloth.rb
83
+ - spec/samples/redcloth.reek
73
84
  - spec/spec.opts
74
85
  - spec/spec_helper.rb
75
86
  - tasks/rspec.rake
87
+ - tasks/samples.rake
76
88
  - website/index.html
77
89
  - website/index.txt
78
90
  - website/javascripts/rounded_corners_lite.inc.js
data/spec/reek_spec.rb DELETED
@@ -1,27 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper.rb'
2
-
3
- require 'reek'
4
-
5
- describe Reek, "#analyse" do
6
-
7
- class ReekAnalyseInner1
8
- def short1(str) f(3);true end
9
- def long(arga, argb, argc, argd=4) f(3);27 end
10
- end
11
-
12
- class ReekAnalyseInner2
13
- def long(arga, argb, argc, argd) f(3);27 end
14
- def short2(str) f(3);true end
15
- end
16
-
17
- it 'should report Long Parameter List' do
18
- rpt = Reek.analyse(ReekAnalyseInner1)
19
- rpt.length.should == 1
20
- end
21
-
22
- it 'should report all Long Parameter Lists' do
23
- rpt = Reek.analyse(ReekAnalyseInner1, ReekAnalyseInner2)
24
- rpt.length.should == 2
25
- end
26
-
27
- end