edouard-metric_fu 1.0.3.2 → 1.0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/base/base_template.rb +134 -0
- data/lib/base/configuration.rb +187 -0
- data/lib/base/generator.rb +147 -0
- data/lib/base/md5_tracker.rb +52 -0
- data/lib/base/report.rb +100 -0
- data/lib/generators/churn.rb +86 -0
- data/lib/generators/flay.rb +29 -0
- data/lib/generators/flog.rb +127 -0
- data/lib/generators/rcov.rb +77 -0
- data/lib/generators/reek.rb +32 -0
- data/lib/generators/roodi.rb +24 -0
- data/lib/generators/saikuro.rb +211 -0
- data/lib/generators/stats.rb +43 -0
- data/lib/metric_fu.rb +21 -0
- data/lib/templates/awesome/awesome_template.rb +30 -0
- data/lib/templates/awesome/churn.html.erb +19 -0
- data/lib/templates/awesome/default.css +62 -0
- data/lib/templates/awesome/flay.html.erb +22 -0
- data/lib/templates/awesome/flog.html.erb +42 -0
- data/lib/templates/awesome/index.html.erb +28 -0
- data/lib/templates/awesome/rcov.html.erb +32 -0
- data/lib/templates/awesome/reek.html.erb +30 -0
- data/lib/templates/awesome/roodi.html.erb +17 -0
- data/lib/templates/awesome/saikuro.html.erb +71 -0
- data/lib/templates/awesome/stats.html.erb +41 -0
- data/lib/templates/standard/churn.html.erb +30 -0
- data/lib/templates/standard/default.css +64 -0
- data/lib/templates/standard/flay.html.erb +33 -0
- data/lib/templates/standard/flog.html.erb +52 -0
- data/lib/templates/standard/index.html.erb +38 -0
- data/lib/templates/standard/rcov.html.erb +42 -0
- data/lib/templates/standard/reek.html.erb +41 -0
- data/lib/templates/standard/roodi.html.erb +28 -0
- data/lib/templates/standard/saikuro.html.erb +83 -0
- data/lib/templates/standard/standard_template.rb +26 -0
- data/lib/templates/standard/stats.html.erb +54 -0
- data/tasks/metric_fu.rake +15 -0
- data/tasks/railroad.rake +39 -0
- data/vendor/saikuro/saikuro.rb +1214 -0
- metadata +40 -1
@@ -0,0 +1,42 @@
|
|
1
|
+
<h3>Flog Results</h3>
|
2
|
+
<p><a href='http://ruby.sadi.st/Flog.html'>Flog</a> measures code complexity.</p>
|
3
|
+
<h2>Total Flog score for all methods: <%= @flog[:total]%></h2>
|
4
|
+
<h2>Average Flog score for all methods: <%= @flog[:average]%></h2>
|
5
|
+
<table>
|
6
|
+
<tr>
|
7
|
+
<th>File</th>
|
8
|
+
<th>Total score</th>
|
9
|
+
<th>Methods</th>
|
10
|
+
<th>Average score</th>
|
11
|
+
<th>Highest score</th>
|
12
|
+
</tr>
|
13
|
+
<% @flog[:pages].each do |page| %>
|
14
|
+
<tr>
|
15
|
+
<td><%= page[:path] %></td>
|
16
|
+
<td><%= page[:score].round %></td>
|
17
|
+
<td><%= page[:scanned_methods].length %></td>
|
18
|
+
<td><%= page[:average_score].round %></td>
|
19
|
+
<td><%= page[:highest_score].round %></td>
|
20
|
+
</tr>
|
21
|
+
<% end %>
|
22
|
+
</table>
|
23
|
+
|
24
|
+
<% @flog[:pages].each do |page| %>
|
25
|
+
<h2><%= page[:path] %></h2>
|
26
|
+
<% page[:scanned_methods].each do |sm| %>
|
27
|
+
<p><%= sm[:name] %></p>
|
28
|
+
<table>
|
29
|
+
<tr>
|
30
|
+
<th>Score</th>
|
31
|
+
<th>Operator</th>
|
32
|
+
</tr>
|
33
|
+
<% sm[:operators].each do |operator| %>
|
34
|
+
<tr>
|
35
|
+
<td><%= operator[:score] %></td>
|
36
|
+
<td><%= operator[:operator] %></td>
|
37
|
+
</tr>
|
38
|
+
<% end %>
|
39
|
+
</table>
|
40
|
+
<% end %>
|
41
|
+
<% end %>
|
42
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<h3>Metric Fu Results</h3>
|
2
|
+
<ul id='projects'>
|
3
|
+
<% if @churn %>
|
4
|
+
<li class='even failure'><a href="churn.html">Churn</a></li>
|
5
|
+
<% end %>
|
6
|
+
<% if @flay %>
|
7
|
+
<li class='even failure'><a href="flay.html">Flay</a></li>
|
8
|
+
<% end %>
|
9
|
+
<% if @flog %>
|
10
|
+
<li class='even failure'><a href="flog.html">Flog</a></li>
|
11
|
+
<% end %>
|
12
|
+
<% if @rcov %>
|
13
|
+
<li class='even failure'><a href="rcov.html">Rcov</a></li>
|
14
|
+
<% end %>
|
15
|
+
<% if @reek %>
|
16
|
+
<li class='even failure'><a href="reek.html">Reek</a></li>
|
17
|
+
<% end %>
|
18
|
+
<% if @roodi %>
|
19
|
+
<li class='even failure'><a href="roodi.html">Roodi</a></li>
|
20
|
+
<% end %>
|
21
|
+
<% if @saikuro %>
|
22
|
+
<li class='even failure'><a href="saikuro.html">Saikuro</a></li>
|
23
|
+
<% end %>
|
24
|
+
<% if @stats %>
|
25
|
+
<li class='even failure'><a href="stats.html">Stats</a></li>
|
26
|
+
<% end %>
|
27
|
+
</ul>
|
28
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<h3>Rcov Code Coverage Results</h3>
|
2
|
+
<p>C0 code coverage information.</p>
|
3
|
+
<p>Total Coverage: <%= @rcov.delete(:global_percent_run) %>% </p>
|
4
|
+
<table>
|
5
|
+
<tr>
|
6
|
+
<th>File Path</th>
|
7
|
+
<th>Percent run</th>
|
8
|
+
</tr>
|
9
|
+
<% count = 0 %>
|
10
|
+
<% @rcov.each_pair do |fname, file| %>
|
11
|
+
<tr>
|
12
|
+
<td><%= fname %></td>
|
13
|
+
<td><%= file[:percent_run] %></td>
|
14
|
+
</tr>
|
15
|
+
<% count += 1 %>
|
16
|
+
<% end %>
|
17
|
+
</table>
|
18
|
+
|
19
|
+
<% @rcov.each_pair do |fname, file| %>
|
20
|
+
<h2> <%= fname %></h2>
|
21
|
+
<div class="rcov_overflow">
|
22
|
+
<table class="rcov_code">
|
23
|
+
<% file[:lines].each do |line| %>
|
24
|
+
<tr>
|
25
|
+
<% css_class = line[:was_run] ? "rcov_run" : "rcov_not_run" %>
|
26
|
+
<td class="<%= css_class %>"><pre><%= line[:content] %></pre></td>
|
27
|
+
</tr>
|
28
|
+
<% end %>
|
29
|
+
</table>
|
30
|
+
</div>
|
31
|
+
<% end %>
|
32
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<h3>Reek Results</h3>
|
2
|
+
<p><a href="http://reek.rubyforge.org/">Reek</a> detects common code smells in ruby code.</p>
|
3
|
+
<table>
|
4
|
+
<tr>
|
5
|
+
<th>File Path</th>
|
6
|
+
<th>Method</th>
|
7
|
+
<th>Description</th>
|
8
|
+
<th>Type</th>
|
9
|
+
</tr>
|
10
|
+
<% count = 0 %>
|
11
|
+
<% @reek[:matches].each do |match| %>
|
12
|
+
<% match[:code_smells].each do |smell| %>
|
13
|
+
<tr class='<%= cycle("light", "dark", count) %>'>
|
14
|
+
<td><%= match[:file_path] %></td>
|
15
|
+
<td>
|
16
|
+
<%= smell[:method] %>
|
17
|
+
</td>
|
18
|
+
<td>
|
19
|
+
<%= smell[:message] %>
|
20
|
+
</td>
|
21
|
+
<td>
|
22
|
+
<%= smell[:type] %>
|
23
|
+
</td>
|
24
|
+
</tr>
|
25
|
+
<% count += 1 %>
|
26
|
+
<% end %>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
</table>
|
30
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<h3>Roodi Results</h3>
|
2
|
+
<p><a href="http://roodi.rubyforge.org/">Roodi</a> parses your Ruby code and warns you about design issues you have based on the checks that is has configured.</p>
|
3
|
+
<table>
|
4
|
+
<tr>
|
5
|
+
<th>File Path</th>
|
6
|
+
<th>Warning</th>
|
7
|
+
</tr>
|
8
|
+
<% count = 0 %>
|
9
|
+
<% @roodi[:problems].each do |problem| %>
|
10
|
+
<tr class='<%= cycle("light", "dark", count) %>'>
|
11
|
+
<td><%= problem[:file] %>:<%= problem[:line] %></td>
|
12
|
+
<td><%= problem[:problem] %></td>
|
13
|
+
</tr>
|
14
|
+
<% count += 1 %>
|
15
|
+
<% end %>
|
16
|
+
</table>
|
17
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
@@ -0,0 +1,71 @@
|
|
1
|
+
<h3>Saikuro Results</h3>
|
2
|
+
<p><a href='http://saikuro.rubyforge.org/'>Saikuro</a> analyzes ruby code for cyclomatic complexity.</p>
|
3
|
+
|
4
|
+
<h2>Analyzed Methods</h2>
|
5
|
+
<table>
|
6
|
+
<tr>
|
7
|
+
<th>Method Name</th>
|
8
|
+
<th>Complexity</th>
|
9
|
+
<th># Lines</th>
|
10
|
+
</tr>
|
11
|
+
<% @saikuro[:methods].each do |method| %>
|
12
|
+
<tr>
|
13
|
+
<td><%= method[:name] %></td>
|
14
|
+
<td><%= method[:complexity] %></td>
|
15
|
+
<td><%= method[:lines] %></td>
|
16
|
+
</tr>
|
17
|
+
<% end %>
|
18
|
+
</table>
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
<h2>Analyzed Classes</h2>
|
23
|
+
<table>
|
24
|
+
<tr>
|
25
|
+
<th>Class Name</th>
|
26
|
+
<th>Complexity</th>
|
27
|
+
<th># Lines</th>
|
28
|
+
</tr>
|
29
|
+
<% @saikuro[:classes].each do |klass| %>
|
30
|
+
<tr>
|
31
|
+
<td><%= klass[:name] %></td>
|
32
|
+
<td><%= klass[:complexity] %></td>
|
33
|
+
<td><%= klass[:lines] %></td>
|
34
|
+
</tr>
|
35
|
+
<% end %>
|
36
|
+
</table>
|
37
|
+
|
38
|
+
|
39
|
+
<h2>Analyzed Files</h2>
|
40
|
+
<% @saikuro[:files].each do |file| %>
|
41
|
+
<% file[:classes].each do |klass| %>
|
42
|
+
<% if !klass[:methods].empty? %>
|
43
|
+
<h3><%= file[:filename] %></h3>
|
44
|
+
<h4>Class : <%= klass[:class_name] %></h4>
|
45
|
+
<h5>Total complexity : <%= klass[:complexity] %></h5>
|
46
|
+
<h5>Total lines : <%= klass[:lines] %></h5>
|
47
|
+
<table>
|
48
|
+
<tr>
|
49
|
+
<th>Method</th>
|
50
|
+
<th>Complexity</th>
|
51
|
+
<th># Lines</th>
|
52
|
+
</tr>
|
53
|
+
<% klass[:methods].each do |method| %>
|
54
|
+
<tr>
|
55
|
+
<td>
|
56
|
+
<%= method[:name] %>
|
57
|
+
</td>
|
58
|
+
<td>
|
59
|
+
<%= method[:complexity] %>
|
60
|
+
</td>
|
61
|
+
<td>
|
62
|
+
<%= method[:lines] %>
|
63
|
+
</td>
|
64
|
+
</tr>
|
65
|
+
<% end %>
|
66
|
+
</table>
|
67
|
+
<% end %>
|
68
|
+
<% end %>
|
69
|
+
<% end %>
|
70
|
+
|
71
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<h3>Rake Stats Results</h3>
|
2
|
+
<p>Rails rake stats results.</p>
|
3
|
+
<table>
|
4
|
+
<tr>
|
5
|
+
<th>Lines of Code</th>
|
6
|
+
<th>Lines of Test</th>
|
7
|
+
<th>Code to test ratio</th>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<td><%= @stats[:codeLOC] %></td>
|
11
|
+
<td><%= @stats[:testLOC] %></td>
|
12
|
+
<td>1:<%= @stats[:code_to_test_ratio] %></td>
|
13
|
+
</tr>
|
14
|
+
</table>
|
15
|
+
|
16
|
+
<table>
|
17
|
+
<tr>
|
18
|
+
<th>Name</th>
|
19
|
+
<th>Lines</th>
|
20
|
+
<th>LOC</th>
|
21
|
+
<th>Classes</th>
|
22
|
+
<th>Methods</th>
|
23
|
+
<th>Methods per class</th>
|
24
|
+
<th>LOC per method</th>
|
25
|
+
</tr>
|
26
|
+
<% count = 0 %>
|
27
|
+
<% @stats[:lines].each do |line| %>
|
28
|
+
<tr>
|
29
|
+
<td><%= line[:name] %></td>
|
30
|
+
<td><%= line[:lines] %></td>
|
31
|
+
<td><%= line[:loc] %></td>
|
32
|
+
<td><%= line[:classes] %></td>
|
33
|
+
<td><%= line[:methods] %></td>
|
34
|
+
<td><%= line[:methods_per_class] %></td>
|
35
|
+
<td><%= line[:loc_per_method] %></td>
|
36
|
+
</tr>
|
37
|
+
<% count += 1 %>
|
38
|
+
<% end %>
|
39
|
+
</table>
|
40
|
+
|
41
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Source Control Churn Results</title>
|
4
|
+
<style>
|
5
|
+
<%= inline_css("default.css") %>
|
6
|
+
</style>
|
7
|
+
</head>
|
8
|
+
|
9
|
+
<body>
|
10
|
+
<h1>Source Control Churn Results</h1>
|
11
|
+
<p>Files that change a lot in your project may be bad a sign.
|
12
|
+
This task uses your source control log to identify those files.
|
13
|
+
</p>
|
14
|
+
<table>
|
15
|
+
<tr>
|
16
|
+
<th>File Path</th>
|
17
|
+
<th>Times Changed</th>
|
18
|
+
</tr>
|
19
|
+
<% count = 0 %>
|
20
|
+
<% @churn[:changes].each do |change| %>
|
21
|
+
<tr>
|
22
|
+
<td><%= change[:file_path] %></td>
|
23
|
+
<td><%= change[:times_changed] %></td>
|
24
|
+
</tr>
|
25
|
+
<% count += 1 %>
|
26
|
+
<% end %>
|
27
|
+
</table>
|
28
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
29
|
+
</body>
|
30
|
+
</html>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
body {
|
2
|
+
background-color: #efefef;
|
3
|
+
margin: 20px;
|
4
|
+
padding: 0;
|
5
|
+
font: 12px verdana, arial, helvetica;
|
6
|
+
}
|
7
|
+
|
8
|
+
table {
|
9
|
+
border-collapse: collapse;
|
10
|
+
border: 1px solid #666;
|
11
|
+
background: #fff;
|
12
|
+
margin-bottom: 20px;
|
13
|
+
}
|
14
|
+
|
15
|
+
table tr.light {
|
16
|
+
background: #fff;
|
17
|
+
}
|
18
|
+
|
19
|
+
table tr.dark {
|
20
|
+
background: #f9f9f9;
|
21
|
+
}
|
22
|
+
|
23
|
+
table td, table th {
|
24
|
+
padding: 4px 10px;
|
25
|
+
font-size: 13px;
|
26
|
+
}
|
27
|
+
table th {
|
28
|
+
text-align: center;
|
29
|
+
color: #fc0;
|
30
|
+
background: #336;
|
31
|
+
font-weight: bold;
|
32
|
+
border: #d0d0d0 1px solid;
|
33
|
+
}
|
34
|
+
|
35
|
+
table td {
|
36
|
+
border: #d0d0d0 1px solid;
|
37
|
+
}
|
38
|
+
|
39
|
+
table td.score {
|
40
|
+
text-align: right;
|
41
|
+
}
|
42
|
+
|
43
|
+
.warning {
|
44
|
+
background: yellow;
|
45
|
+
}
|
46
|
+
.rcov_code td {
|
47
|
+
border-bottom: 1px solid #ddd ;
|
48
|
+
padding: 0;
|
49
|
+
margin: 0;
|
50
|
+
}
|
51
|
+
.rcov_code tr {
|
52
|
+
border: 0px;
|
53
|
+
padding:0px;
|
54
|
+
margin: 0px;
|
55
|
+
}
|
56
|
+
.rcov_code pre {
|
57
|
+
border: 0px;
|
58
|
+
padding: 0px;
|
59
|
+
margin: 0px;
|
60
|
+
}
|
61
|
+
.rcov_run {}
|
62
|
+
.rcov_not_run {
|
63
|
+
background-color: #d88;
|
64
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Flay Results</title>
|
4
|
+
<style>
|
5
|
+
<%= inline_css("default.css") %>
|
6
|
+
</style>
|
7
|
+
</head>
|
8
|
+
|
9
|
+
<body>
|
10
|
+
<h1>Flay Results</h1>
|
11
|
+
<h2>Total Score (lower is better): <%= @flay[:total_score] %></h2>
|
12
|
+
<p><a href='http://ruby.sadi.st/Flay.html'>Flay</a> analyzes ruby code for structural similarities.</p>
|
13
|
+
<table>
|
14
|
+
<tr>
|
15
|
+
<th>Files</th>
|
16
|
+
<th>Matches</th>
|
17
|
+
</tr>
|
18
|
+
<% count = 0 %>
|
19
|
+
<% @flay[:matches].each do |match| %>
|
20
|
+
<tr class='<%= cycle("light", "dark", count) %>'>
|
21
|
+
<td>
|
22
|
+
<% match[:matches].each do |file| %>
|
23
|
+
<%= file[:name] %>:<%= file[:line] %><br />
|
24
|
+
<% end %>
|
25
|
+
</td>
|
26
|
+
<td><%= match[:reason] %></td>
|
27
|
+
</tr>
|
28
|
+
<% count += 1 %>
|
29
|
+
<% end %>
|
30
|
+
</table>
|
31
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
32
|
+
</body>
|
33
|
+
</html>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Flog Reporter</title>
|
4
|
+
<style>
|
5
|
+
<%= inline_css("default.css") %>
|
6
|
+
</style>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<h1>Flog Results</h1>
|
10
|
+
<p><a href='http://ruby.sadi.st/Flog.html'>Flog</a> measures code complexity.</p>
|
11
|
+
<h2>Total Flog score for all methods: <%= @flog[:total]%></h2>
|
12
|
+
<h2>Average Flog score for all methods: <%= @flog[:average]%></h2>
|
13
|
+
<table>
|
14
|
+
<tr>
|
15
|
+
<th>File</th>
|
16
|
+
<th>Total score</th>
|
17
|
+
<th>Methods</th>
|
18
|
+
<th>Average score</th>
|
19
|
+
<th>Highest score</th>
|
20
|
+
</tr>
|
21
|
+
<% @flog[:pages].each do |page| %>
|
22
|
+
<tr>
|
23
|
+
<td><%= page[:path] %></td>
|
24
|
+
<td><%= page[:score].round %></td>
|
25
|
+
<td><%= page[:scanned_methods].length %></td>
|
26
|
+
<td><%= page[:average_score].round %></td>
|
27
|
+
<td><%= page[:highest_score].round %></td>
|
28
|
+
</tr>
|
29
|
+
<% end %>
|
30
|
+
</table>
|
31
|
+
|
32
|
+
<% @flog[:pages].each do |page| %>
|
33
|
+
<h2><%= page[:path] %></h2>
|
34
|
+
<% page[:scanned_methods].each do |sm| %>
|
35
|
+
<p><%= sm[:name] %></p>
|
36
|
+
<table>
|
37
|
+
<tr>
|
38
|
+
<th>Score</th>
|
39
|
+
<th>Operator</th>
|
40
|
+
</tr>
|
41
|
+
<% sm[:operators].each do |operator| %>
|
42
|
+
<tr>
|
43
|
+
<td><%= operator[:score] %></td>
|
44
|
+
<td><%= operator[:operator] %></td>
|
45
|
+
</tr>
|
46
|
+
<% end %>
|
47
|
+
</table>
|
48
|
+
<% end %>
|
49
|
+
<% end %>
|
50
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
51
|
+
</body>
|
52
|
+
</html>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Metric Fu Results</title>
|
4
|
+
<style>
|
5
|
+
<%= inline_css("default.css") %>
|
6
|
+
</style>
|
7
|
+
</head>
|
8
|
+
|
9
|
+
<body>
|
10
|
+
<h1>Metric Fu Results</h1>
|
11
|
+
<% if @churn %>
|
12
|
+
<p><a href="churn.html">Churn report</a></p>
|
13
|
+
<% end %>
|
14
|
+
<% if @flay %>
|
15
|
+
<p><a href="flay.html">Flay report</a></p>
|
16
|
+
<% end %>
|
17
|
+
<% if @flog %>
|
18
|
+
<p><a href="flog.html">Flog report</a></p>
|
19
|
+
<% end %>
|
20
|
+
<% if @rcov %>
|
21
|
+
<p><a href="rcov.html">Rcov report</a></p>
|
22
|
+
<% end %>
|
23
|
+
<% if @reek %>
|
24
|
+
<p><a href="reek.html">Reek report</a></p>
|
25
|
+
<% end %>
|
26
|
+
<% if @roodi %>
|
27
|
+
<p><a href="roodi.html">Roodi report</a></p>
|
28
|
+
<% end %>
|
29
|
+
<% if @saikuro %>
|
30
|
+
<p><a href="saikuro.html">Saikuro report</a></p>
|
31
|
+
<% end %>
|
32
|
+
<% if @stats %>
|
33
|
+
<p><a href="stats.html">Stats report</a></p>
|
34
|
+
<% end %>
|
35
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
36
|
+
</body>
|
37
|
+
</html>
|
38
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Rcov Code Coverage Results</title>
|
4
|
+
<style>
|
5
|
+
<%= inline_css("default.css") %>
|
6
|
+
</style>
|
7
|
+
</head>
|
8
|
+
|
9
|
+
<body>
|
10
|
+
<h1>Rcov Code Coverage Results</h1>
|
11
|
+
<p>C0 code coverage information.</p>
|
12
|
+
<p>Total Coverage: <%= @rcov.delete(:global_percent_run) %>% </p>
|
13
|
+
<table>
|
14
|
+
<tr>
|
15
|
+
<th>File Path</th>
|
16
|
+
<th>Percent run</th>
|
17
|
+
</tr>
|
18
|
+
<% count = 0 %>
|
19
|
+
<% @rcov.each_pair do |fname, file| %>
|
20
|
+
<tr>
|
21
|
+
<td><%= fname %></td>
|
22
|
+
<td><%= file[:percent_run] %></td>
|
23
|
+
</tr>
|
24
|
+
<% count += 1 %>
|
25
|
+
<% end %>
|
26
|
+
</table>
|
27
|
+
|
28
|
+
<% @rcov.each_pair do |fname, file| %>
|
29
|
+
<h2> <%= fname %></h2>
|
30
|
+
<table class="rcov_code">
|
31
|
+
<% file[:lines].each do |line| %>
|
32
|
+
<tr>
|
33
|
+
<% css_class = line[:was_run] ? "rcov_run" : "rcov_not_run" %>
|
34
|
+
<td class="<%= css_class %>"><pre><%= line[:content] %></pre></td>
|
35
|
+
</tr>
|
36
|
+
<% end %>
|
37
|
+
</table>
|
38
|
+
<% end %>
|
39
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
40
|
+
</body>
|
41
|
+
</html>
|
42
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Reek Results</title>
|
4
|
+
<style>
|
5
|
+
<%= inline_css("default.css") %>
|
6
|
+
</style>
|
7
|
+
</head>
|
8
|
+
|
9
|
+
<body>
|
10
|
+
<h1>Reek Results</h1>
|
11
|
+
<p><a href="http://reek.rubyforge.org/">Reek</a> detects common code smells in ruby code.</p>
|
12
|
+
<table>
|
13
|
+
<tr>
|
14
|
+
<th>File Path</th>
|
15
|
+
<th>Method</th>
|
16
|
+
<th>Description</th>
|
17
|
+
<th>Type</th>
|
18
|
+
</tr>
|
19
|
+
<% count = 0 %>
|
20
|
+
<% @reek[:matches].each do |match| %>
|
21
|
+
<% match[:code_smells].each do |smell| %>
|
22
|
+
<tr class='<%= cycle("light", "dark", count) %>'>
|
23
|
+
<td><%= match[:file_path] %></td>
|
24
|
+
<td>
|
25
|
+
<%= smell[:method] %>
|
26
|
+
</td>
|
27
|
+
<td>
|
28
|
+
<%= smell[:message] %>
|
29
|
+
</td>
|
30
|
+
<td>
|
31
|
+
<%= smell[:type] %>
|
32
|
+
</td>
|
33
|
+
</tr>
|
34
|
+
<% count += 1 %>
|
35
|
+
<% end %>
|
36
|
+
<% end %>
|
37
|
+
|
38
|
+
</table>
|
39
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
40
|
+
</body>
|
41
|
+
</html>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Roodi Results</title>
|
4
|
+
<style>
|
5
|
+
<%= inline_css("default.css") %>
|
6
|
+
</style>
|
7
|
+
</head>
|
8
|
+
|
9
|
+
<body>
|
10
|
+
<h1>Roodi Results</h1>
|
11
|
+
<p><a href="http://roodi.rubyforge.org/">Roodi</a> parses your Ruby code and warns you about design issues you have based on the checks that is has configured.</p>
|
12
|
+
<table>
|
13
|
+
<tr>
|
14
|
+
<th>File Path</th>
|
15
|
+
<th>Warning</th>
|
16
|
+
</tr>
|
17
|
+
<% count = 0 %>
|
18
|
+
<% @roodi[:problems].each do |problem| %>
|
19
|
+
<tr class='<%= cycle("light", "dark", count) %>'>
|
20
|
+
<td><%= problem[:file] %>:<%= problem[:line] %></td>
|
21
|
+
<td><%= problem[:problem] %></td>
|
22
|
+
</tr>
|
23
|
+
<% count += 1 %>
|
24
|
+
<% end %>
|
25
|
+
</table>
|
26
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
27
|
+
</body>
|
28
|
+
</html>
|
@@ -0,0 +1,83 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Saikuro Results</title>
|
4
|
+
<style>
|
5
|
+
<%= inline_css("default.css") %>
|
6
|
+
</style>
|
7
|
+
</head>
|
8
|
+
|
9
|
+
<body>
|
10
|
+
<h1>Saikuro Results</h1>
|
11
|
+
<p><a href='http://saikuro.rubyforge.org/'>Saikuro</a> analyzes ruby code for cyclomatic complexity.</p>
|
12
|
+
|
13
|
+
<h2>Analyzed Methods</h2>
|
14
|
+
<table>
|
15
|
+
<tr>
|
16
|
+
<th>Method Name</th>
|
17
|
+
<th>Complexity</th>
|
18
|
+
<th># Lines</th>
|
19
|
+
</tr>
|
20
|
+
<% @saikuro[:methods].each do |method| %>
|
21
|
+
<tr>
|
22
|
+
<td><%= method[:name] %></td>
|
23
|
+
<td><%= method[:complexity] %></td>
|
24
|
+
<td><%= method[:lines] %></td>
|
25
|
+
</tr>
|
26
|
+
<% end %>
|
27
|
+
</table>
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
<h2>Analyzed Classes</h2>
|
32
|
+
<table>
|
33
|
+
<tr>
|
34
|
+
<th>Class Name</th>
|
35
|
+
<th>Complexity</th>
|
36
|
+
<th># Lines</th>
|
37
|
+
</tr>
|
38
|
+
<% @saikuro[:classes].each do |klass| %>
|
39
|
+
<tr>
|
40
|
+
<td><%= klass[:name] %></td>
|
41
|
+
<td><%= klass[:complexity] %></td>
|
42
|
+
<td><%= klass[:lines] %></td>
|
43
|
+
</tr>
|
44
|
+
<% end %>
|
45
|
+
</table>
|
46
|
+
|
47
|
+
|
48
|
+
<h2>Analyzed Files</h2>
|
49
|
+
<% @saikuro[:files].each do |file| %>
|
50
|
+
<% file[:classes].each do |klass| %>
|
51
|
+
<% if !klass[:methods].empty? %>
|
52
|
+
<h3><%= file[:filename] %></h3>
|
53
|
+
<h4>Class : <%= klass[:class_name] %></h4>
|
54
|
+
<h5>Total complexity : <%= klass[:complexity] %></h5>
|
55
|
+
<h5>Total lines : <%= klass[:lines] %></h5>
|
56
|
+
<table>
|
57
|
+
<tr>
|
58
|
+
<th>Method</th>
|
59
|
+
<th>Complexity</th>
|
60
|
+
<th># Lines</th>
|
61
|
+
</tr>
|
62
|
+
<% klass[:methods].each do |method| %>
|
63
|
+
<tr>
|
64
|
+
<td>
|
65
|
+
<%= method[:name] %>
|
66
|
+
</td>
|
67
|
+
<td>
|
68
|
+
<%= method[:complexity] %>
|
69
|
+
</td>
|
70
|
+
<td>
|
71
|
+
<%= method[:lines] %>
|
72
|
+
</td>
|
73
|
+
</tr>
|
74
|
+
<% end %>
|
75
|
+
</table>
|
76
|
+
<% end %>
|
77
|
+
<% end %>
|
78
|
+
<% end %>
|
79
|
+
|
80
|
+
<p>Generated on <%= Time.now.localtime %></p>
|
81
|
+
</body>
|
82
|
+
</html>
|
83
|
+
|