]> source.dussan.org Git - sonarqube.git/commitdiff
Reformat code for some core widgets
authorEvgeny Mandrikov <mandrikov@gmail.com>
Mon, 19 Mar 2012 05:36:05 +0000 (09:36 +0400)
committerEvgeny Mandrikov <mandrikov@gmail.com>
Mon, 19 Mar 2012 06:29:28 +0000 (10:29 +0400)
* Replace tabs by spaces
* Align blocks

plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/coverage.html.erb
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/it_coverage.html.erb
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb

index a40542f0852e19c145c59655bf8e2d0d3664c1cb..3eb807b0847fdd3822e9e250e73ca407a208c7e6 100644 (file)
@@ -1,4 +1,3 @@
-
 <%
  file_complexity=measure('file_complexity')
  function_complexity=measure('function_complexity')
@@ -117,4 +116,3 @@ if file_distribution
  </table>
 <div class="clear"></div>
 <% end %>
-
index d661b2955608a81403446ffdb0dc533734ee4245..49cc103ff9ab82c9c66ab859a3e4067b39c1b6b0 100644 (file)
@@ -7,8 +7,8 @@
   if code_coverage_measure || tests_measure
 %>
 <table width="100%">
-       <tr>
-               <td valign="top" width="50%" nowrap>
+  <tr>
+    <td valign="top" width="50%" nowrap>
       <div class="dashbox">
         <p class="title"><%= message('widget.code_coverage.name') -%></p>
         <p>
index 050cb2d8e98f4ef14fde497e5aee3e76000d6a2a..f039205bc53ba14cbba1794508b57a031641697a 100644 (file)
@@ -3,8 +3,8 @@
   if coverage_measure
 %>
 <table width="100%">
-       <tr>
-               <td nowrap valign="top">
+  <tr>
+    <td nowrap valign="top">
       <div class="dashbox">
         <p class="title"><%= message('widget.it-coverage.name') -%></p>
         <p>
@@ -74,5 +74,3 @@
 </tr>
 </table>
 <% end %>
-
-
index 4c2f9d1fda846dc40e1504bff8bd87d19851ffa1..e6366b32bc82c63340416817666edd15a53aa74a 100644 (file)
     statements=measure('statements')
 %>
 <table width="100%">
-       <tr>
-               <td valign="top" width="48%" nowrap>
-                       <div class="dashbox">
-                     <h3><%= message('widget.size.lines_of_code') -%></h3>
-                           <% if ncloc %>
-                             <p>
-                               <span class="big"><%= format_measure(ncloc, :suffix => '', :url => url_for_drilldown(ncloc)) -%></span>
-                               <%= dashboard_configuration.selected_period? ? format_variation(ncloc) : trend_icon(ncloc) -%>
-                             </p>
-                             <%
-                               generated_ncloc=measure('generated_ncloc')
-                               if generated_ncloc && generated_ncloc.value>0
-                             %>
-                             <p>+<%= format_measure(generated_ncloc, :suffix => message('widget.size.generated.suffix'), :url => url_for_drilldown(generated_ncloc)) -%> <%= dashboard_configuration.selected_period? ? format_variation(generated_ncloc) : trend_icon(generated_ncloc) -%></p>
-                             <% end %>
-                             <p><%= format_measure(lines, :suffix => message('widget.size.lines.suffix'), :url => url_for_drilldown(lines)) -%> <%= dashboard_configuration.selected_period? ? format_variation(lines) : trend_icon(lines) -%></p>
-                           <% else%>
-                             <p><span class="big"><%= format_measure(lines, :suffix => '', :url => url_for_drilldown(lines)) -%> <%= trend_icon(lines) -%></span></p>
-                           <% end %>
-                           <%
-                             generated_lines=measure('generated_lines')
-                             if generated_lines && generated_lines.value>0
-                           %>
-                             <p>incl. <%= format_measure(generated_lines, :suffix => message('widget.size.generated.suffix'), :url => url_for_drilldown(generated_lines)) -%> <%= dashboard_configuration.selected_period? ? format_variation(generated_lines) : trend_icon(generated_lines) -%></p>
-                           <% end %>
-                           <% if statements %>
+  <tr>
+    <td valign="top" width="48%" nowrap>
+      <div class="dashbox">
+        <h3><%= message('widget.size.lines_of_code') -%></h3>
+        <% if ncloc %>
           <p>
-          <%= format_measure(statements, :suffix => message('widget.size.statements.suffix'), :url => url_for_drilldown(statements)) -%> <%= dashboard_configuration.selected_period? ? format_variation(statements) : trend_icon(statements) -%>
+            <span class="big"><%= format_measure(ncloc, :suffix => '', :url => url_for_drilldown(ncloc)) -%></span>
+            <%= dashboard_configuration.selected_period? ? format_variation(ncloc) : trend_icon(ncloc) -%>
           </p>
+          <%
+            generated_ncloc=measure('generated_ncloc')
+            if generated_ncloc && generated_ncloc.value>0
+          %>
+            <p>+<%= format_measure(generated_ncloc, :suffix => message('widget.size.generated.suffix'), :url => url_for_drilldown(generated_ncloc)) -%> <%= dashboard_configuration.selected_period? ? format_variation(generated_ncloc) : trend_icon(generated_ncloc) -%></p>
           <% end %>
-                           <% if files && measure('classes') %>
-                             <p><%= format_measure(files, :suffix => message('widget.size.files.suffix'), :url => url_for_drilldown(files)) -%> <%= dashboard_configuration.selected_period? ? format_variation(files) : trend_icon(files) -%></p>
-                           <% end %>
-                   </div>
-               </td>
-               <td width="10"> </td>
-               <td valign="top">
-                       <div class="dashbox">
-                         <% if classes %>
-                       <h3><%= message('widget.size.classes') -%></h3>
-                       <p>
-                         <span class="big"><%= format_measure(classes, :url => url_for_drilldown(classes)) -%></span>
-                         <%= dashboard_configuration.selected_period? ? format_variation(classes) : trend_icon(classes) -%>
-                       </p>
-                           <p><%= format_measure(packages, :suffix => message('widget.size.packages.suffix'), :url => url_for_drilldown(packages)) -%> <%= dashboard_configuration.selected_period? ? format_variation(packages) : trend_icon(packages) -%></p>
-                     <% else %>
-                       <h3><%= message('widget.size.files') -%></h3>
-                       <p><span class="big"><%= format_measure(files, :url => url_for_drilldown(files)) -%></span>
-                         <%= dashboard_configuration.selected_period? ? format_variation(files) : trend_icon(files) -%>
-                       </p>
-                           <p><%= format_measure('directories', :suffix => message('widget.size.directories.suffix'), :url => url_for_drilldown('directories')) -%> <%= dashboard_configuration.selected_period? ? format_variation('directories') : trend_icon('directories') -%></p>
-                     <% end %>
-                     <p><%= format_measure(functions, :suffix => message('widget.size.methods.suffix'), :url => url_for_drilldown(functions)) -%> <%= dashboard_configuration.selected_period? ? format_variation(functions) : trend_icon(functions) -%></p>
-                     <%
-                       if (measure('accessors'))
-                     %>
-                       <p><%= format_measure('accessors', :suffix => message('widget.size.accessors.suffix'), :url => url_for_drilldown('accessors')) -%> <%= dashboard_configuration.selected_period? ? format_variation('accessors') : trend_icon('accessors') -%></p>
-                     <% end %>
-                     <% if measure('paragraphs') %>
-                             <p><%= format_measure('paragraphs', :suffix => message('widget.size.paragraphs.suffix'), :url => url_for_drilldown('paragraphs')) -%> <%= dashboard_configuration.selected_period? ? format_variation('paragraphs') : trend_icon('paragraphs') -%></p>
-                           <% end %>
-                   </div>
-               </td>
-       </tr>
+            <p><%= format_measure(lines, :suffix => message('widget.size.lines.suffix'), :url => url_for_drilldown(lines)) -%> <%= dashboard_configuration.selected_period? ? format_variation(lines) : trend_icon(lines) -%></p>
+        <% else%>
+            <p><span class="big"><%= format_measure(lines, :suffix => '', :url => url_for_drilldown(lines)) -%> <%= trend_icon(lines) -%></span></p>
+        <% end %>
+        <%
+          generated_lines=measure('generated_lines')
+          if generated_lines && generated_lines.value>0
+        %>
+          <p>incl. <%= format_measure(generated_lines, :suffix => message('widget.size.generated.suffix'), :url => url_for_drilldown(generated_lines)) -%> <%= dashboard_configuration.selected_period? ? format_variation(generated_lines) : trend_icon(generated_lines) -%></p>
+        <% end %>
+        <% if statements %>
+          <p>
+          <%= format_measure(statements, :suffix => message('widget.size.statements.suffix'), :url => url_for_drilldown(statements)) -%> <%= dashboard_configuration.selected_period? ? format_variation(statements) : trend_icon(statements) -%>
+          </p>
+        <% end %>
+        <% if files && measure('classes') %>
+          <p><%= format_measure(files, :suffix => message('widget.size.files.suffix'), :url => url_for_drilldown(files)) -%> <%= dashboard_configuration.selected_period? ? format_variation(files) : trend_icon(files) -%></p>
+        <% end %>
+      </div>
+    </td>
+    <td width="10"> </td>
+    <td valign="top">
+      <div class="dashbox">
+        <% if classes %>
+          <h3><%= message('widget.size.classes') -%></h3>
+          <p>
+            <span class="big"><%= format_measure(classes, :url => url_for_drilldown(classes)) -%></span>
+            <%= dashboard_configuration.selected_period? ? format_variation(classes) : trend_icon(classes) -%>
+          </p>
+          <p><%= format_measure(packages, :suffix => message('widget.size.packages.suffix'), :url => url_for_drilldown(packages)) -%> <%= dashboard_configuration.selected_period? ? format_variation(packages) : trend_icon(packages) -%></p>
+        <% else %>
+          <h3><%= message('widget.size.files') -%></h3>
+          <p>
+            <span class="big"><%= format_measure(files, :url => url_for_drilldown(files)) -%></span>
+            <%= dashboard_configuration.selected_period? ? format_variation(files) : trend_icon(files) -%>
+          </p>
+          <p><%= format_measure('directories', :suffix => message('widget.size.directories.suffix'), :url => url_for_drilldown('directories')) -%> <%= dashboard_configuration.selected_period? ? format_variation('directories') : trend_icon('directories') -%></p>
+        <% end %>
+        <p><%= format_measure(functions, :suffix => message('widget.size.methods.suffix'), :url => url_for_drilldown(functions)) -%> <%= dashboard_configuration.selected_period? ? format_variation(functions) : trend_icon(functions) -%></p>
+        <%
+          if (measure('accessors'))
+        %>
+          <p><%= format_measure('accessors', :suffix => message('widget.size.accessors.suffix'), :url => url_for_drilldown('accessors')) -%> <%= dashboard_configuration.selected_period? ? format_variation('accessors') : trend_icon('accessors') -%></p>
+        <% end %>
+        <% if measure('paragraphs') %>
+          <p><%= format_measure('paragraphs', :suffix => message('widget.size.paragraphs.suffix'), :url => url_for_drilldown('paragraphs')) -%> <%= dashboard_configuration.selected_period? ? format_variation('paragraphs') : trend_icon('paragraphs') -%></p>
+        <% end %>
+      </div>
+    </td>
+  </tr>
 </table>
 <% end %>
\ No newline at end of file