Permalink
Browse files

Sort Flog by highest score in the class which I feel is more importan…

…t than the total flog flog score
  • Loading branch information...
1 parent b5b4d99 commit 11fb9d669b076a4c2e27fae6fee713825f73be97 @jscruggs jscruggs committed Jul 8, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/generators/flog.rb
View
@@ -62,7 +62,7 @@ def analyze
def to_h
number_of_methods = @pages.inject(0) {|count, page| count += page.scanned_methods.size}
total_flog_score = @pages.inject(0) {|total, page| total += page.score}
- sorted_pages = @pages.sort_by {|page| page.score }.reverse
+ sorted_pages = @pages.sort_by {|page| page.highest_score }.reverse
{:flog => { :total => total_flog_score,
:average => average_score(total_flog_score, number_of_methods),
:pages => sorted_pages.map {|page| page.to_h}}}

0 comments on commit 11fb9d6

Please sign in to comment.