diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-02-06 17:57:27 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-02-06 17:57:27 +0100 |
commit | b73397a160c4f84702c659bb596394fff9d7fe98 (patch) | |
tree | a6a23dfa086b0c18b3af2d18354b62da6274652b /plugins | |
parent | 2a741a4965540bffc965210de6eda49b449d92d2 (diff) | |
download | sonarqube-b73397a160c4f84702c659bb596394fff9d7fe98.tar.gz sonarqube-b73397a160c4f84702c659bb596394fff9d7fe98.zip |
SONAR-4112 Remove the unused/deprecated metrics "Complexity/paragraph" and "Paragraph"
Diffstat (limited to 'plugins')
4 files changed, 2 insertions, 147 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index 88eb667f1b7..d04c171c0d6 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -828,7 +828,6 @@ widget.comments_duplications.files.suffix=\ files widget.complexity.name=Complexity widget.complexity.description=Reports on complexity, average complexity and complexity distribution. widget.complexity.per_method.suffix=\ /method -widget.complexity.per_paragraph.suffix=\ /paragraph widget.complexity.per_class.suffix=\ /class widget.complexity.per_file.suffix=\ /file widget.complexity.total=Total @@ -884,7 +883,6 @@ widget.size.packages.suffix=\ packages widget.size.directories.suffix=\ directories widget.size.methods.suffix=\ methods widget.size.accessors.suffix=\ accessors -widget.size.paragraphs.suffix=\ paragraphs widget.size.projects.suffix=\ projects widget.timeline.name=Timeline @@ -1702,9 +1700,6 @@ metric.packages.name=Packages metric.packages.description=Packages metric.packages.abbreviation=Pkgs -metric.paragraphs.name=Paragraphs -metric.paragraphs.description=Number of paragraphs - metric.public_api.name=Public API metric.public_api.description=Public API @@ -1732,9 +1727,6 @@ metric.file_complexity.name=Complexity /file metric.file_complexity.description=Complexity average by file metric.file_complexity.abbreviation=Cmpx/file -metric.paragraph_complexity.name=Complexity /paragraph -metric.paragraph_complexity.description=Complexity average by paragraph - metric.class_complexity_distribution.name=Classes distribution /complexity metric.class_complexity_distribution.description=Classes distribution /complexity @@ -1744,8 +1736,6 @@ metric.function_complexity_distribution.description=Methods distribution /comple metric.file_complexity_distribution.name=Files distribution /complexity metric.file_complexity_distribution.description=Files distribution /complexity -metric.paragraph_complexity_distribution.name=Paragraph distribution /complexity -metric.paragraph_complexity_distribution.description=Paragraph distribution /complexity #-------------------------------------------------------------------------------------------------------------------- # diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb index f443933d80e..93aad44b733 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/complexity.html.erb @@ -2,9 +2,8 @@ file_complexity=measure('file_complexity') function_complexity=measure('function_complexity') class_complexity=measure('class_complexity') - paragraph_complexity=measure('paragraph_complexity') - if file_complexity || function_complexity || class_complexity || paragraph_complexity + if file_complexity || function_complexity || class_complexity complexity=measure('complexity') %> <table class="width100"> @@ -19,12 +18,6 @@ complexity=measure('complexity') <%= dashboard_configuration.selected_period? ? format_variation(function_complexity) : trend_icon(function_complexity) -%> </p> <% end %> - <% if paragraph_complexity %> - <p> - <span class="big"><%= format_measure(paragraph_complexity, :suffix => '', :url => url_for_drilldown(paragraph_complexity)) %></span><%= message('widget.complexity.per_paragraph.suffix') -%> - <%= dashboard_configuration.selected_period? ? format_variation(paragraph_complexity) : trend_icon(paragraph_complexity) -%> - </p> - <% end %> <% if class_complexity %> <p> <span class="big"><%= format_measure(class_complexity, :suffix => '', :url => url_for_drilldown(class_complexity)) %></span></span><%= message('widget.complexity.per_class.suffix') -%> @@ -47,10 +40,9 @@ complexity=measure('complexity') <td valign="top" width="50%" nowrap> <% function_distribution=measure('function_complexity_distribution') - paragraph_distribution=measure('paragraph_complexity_distribution') class_distribution=measure('class_complexity_distribution') file_distribution=measure('file_complexity_distribution') - distributions=[function_distribution,paragraph_distribution,class_distribution,file_distribution].compact + distributions=[function_distribution,class_distribution,file_distribution].compact selected_distribution=nil if distributions.size>0 selected_distribution=distributions.first @@ -88,12 +80,6 @@ complexity=measure('complexity') <input type="radio" name="cmp_dist" value="function_complexity_distribution" id="cmp_dist_function_complexity_distribution" onClick="selectComplexity('function_complexity_distribution');" <%= 'checked' if function_distribution==selected_distribution -%>/> <label for="cmp_dist_function_complexity_distribution"><%= message('metric.functions.name') -%></label> <% end -if paragraph_distribution - count_dist+=1 -%> -<input type="radio" name="cmp_dist" value="paragraph_complexity_distribution" id="cmp_dist_paragraph_complexity_distribution" onClick="selectComplexity('paragraph_complexity_distribution');" <%= 'checked' if paragraph_distribution==selected_distribution -%>/> <label for="cmp_dist_paragraph_complexity_distribution"><%= message('metric.paragraphs.name') -%></label><%= '<br/>' if count_dist==2 %> -<% -end if class_distribution count_dist+=1 %> diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb index a1161994a1a..23bcb4a27b0 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb @@ -75,9 +75,6 @@ %> <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> diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/test_complexity.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/test_complexity.html.erb deleted file mode 100644 index f443933d80e..00000000000 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/test_complexity.html.erb +++ /dev/null @@ -1,118 +0,0 @@ -<% - file_complexity=measure('file_complexity') - function_complexity=measure('function_complexity') - class_complexity=measure('class_complexity') - paragraph_complexity=measure('paragraph_complexity') - - if file_complexity || function_complexity || class_complexity || paragraph_complexity -complexity=measure('complexity') -%> -<table class="width100"> - <tbody> - <tr> - <td valign="top" width="50%"> - <div class="dashbox" > - <h3><%= message('widget.complexity.name') -%></h3> - <% if function_complexity %> - <p> - <span class="big"><%= format_measure(function_complexity, :suffix => '', :url => url_for_drilldown(function_complexity)) %></span><%= message('widget.complexity.per_method.suffix') -%> - <%= dashboard_configuration.selected_period? ? format_variation(function_complexity) : trend_icon(function_complexity) -%> - </p> - <% end %> - <% if paragraph_complexity %> - <p> - <span class="big"><%= format_measure(paragraph_complexity, :suffix => '', :url => url_for_drilldown(paragraph_complexity)) %></span><%= message('widget.complexity.per_paragraph.suffix') -%> - <%= dashboard_configuration.selected_period? ? format_variation(paragraph_complexity) : trend_icon(paragraph_complexity) -%> - </p> - <% end %> - <% if class_complexity %> - <p> - <span class="big"><%= format_measure(class_complexity, :suffix => '', :url => url_for_drilldown(class_complexity)) %></span></span><%= message('widget.complexity.per_class.suffix') -%> - <%= dashboard_configuration.selected_period? ? format_variation(class_complexity) : trend_icon(class_complexity) -%> - </p> - <% end %> - <% if file_complexity %> - <p> - <span class="big"><%= format_measure(file_complexity, :suffix => '', :url => url_for_drilldown(file_complexity)) %></span></span><%= message('widget.complexity.per_file.suffix') -%> - <%= dashboard_configuration.selected_period? ? format_variation(file_complexity) : trend_icon(file_complexity) -%> - </p> - <% end %> - <% if complexity %> - <p> - <%= message('widget.complexity.total') -%>: <%= format_measure(complexity, :url => url_for_drilldown(complexity)) -%> <%= dashboard_configuration.selected_period? ? format_variation(complexity) : trend_icon(complexity) -%> - </p> - <% end %> - </div> - </td> - <td valign="top" width="50%" nowrap> -<% - function_distribution=measure('function_complexity_distribution') - paragraph_distribution=measure('paragraph_complexity_distribution') - class_distribution=measure('class_complexity_distribution') - file_distribution=measure('file_complexity_distribution') - distributions=[function_distribution,paragraph_distribution,class_distribution,file_distribution].compact - selected_distribution=nil - if distributions.size>0 - selected_distribution=distributions.first - end - if selected_distribution -%> -<div class="dashbox" id="cmp_charts"> - <script type='text/javascript'> - //<![CDATA[ - function selectComplexity(metric) { - $$('#cmp_charts .chart').each(function(chart) { - chart.hide(); - }); - $('chart_' + metric).show(); - } - </script> - <style> - #cmp_charts form { - font-size: 93%;padding-left: 30px; - } -#cmp_charts form label { - padding-right: 5px; - } - </style> - <% distributions.each do |distribution_measure| %> - <%= render :partial => 'project/widgets/complexity_chart', :locals => { :metric => distribution_measure.metric.key, :title => distribution_measure.metric.description, :visible => (selected_distribution==distribution_measure) } %> - <% end %> - - <form> - <% - count_dist=0 - if function_distribution - count_dist+=1 - %> -<input type="radio" name="cmp_dist" value="function_complexity_distribution" id="cmp_dist_function_complexity_distribution" onClick="selectComplexity('function_complexity_distribution');" <%= 'checked' if function_distribution==selected_distribution -%>/> <label for="cmp_dist_function_complexity_distribution"><%= message('metric.functions.name') -%></label> -<% -end -if paragraph_distribution - count_dist+=1 -%> -<input type="radio" name="cmp_dist" value="paragraph_complexity_distribution" id="cmp_dist_paragraph_complexity_distribution" onClick="selectComplexity('paragraph_complexity_distribution');" <%= 'checked' if paragraph_distribution==selected_distribution -%>/> <label for="cmp_dist_paragraph_complexity_distribution"><%= message('metric.paragraphs.name') -%></label><%= '<br/>' if count_dist==2 %> -<% -end -if class_distribution - count_dist+=1 -%> -<input type="radio" name="cmp_dist" value="class_complexity_distribution" id="cmp_dist_class_complexity_distribution" onClick="selectComplexity('class_complexity_distribution');" <%= 'checked' if class_distribution==selected_distribution -%>/> <label for="cmp_dist_class_complexity_distribution"><%= message('metric.classes.name') -%></label><%= '<br/>' if count_dist==2 %> -<% -end -if file_distribution - count_dist+=1 -%> -<input type="radio" name="cmp_dist" value="file_complexity_distribution" id="cmp_dist_file_complexity_distribution" onClick="selectComplexity('file_complexity_distribution');" <%= 'checked' if file_distribution==selected_distribution -%>/> <label for="cmp_dist_file_complexity_distribution"><%= message('metric.files.name') -%></label> -<% end %> - - </form> - -</div> -<% end %> - </td> - </tr> - </tbody> - </table> -<div class="clear"></div> -<% end %> |