Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Don't even record a score if method stack is empty and user used --…

…methods-only.

[git-p4: depot-paths = "//src/flog/dev/": change = 8948]
  • Loading branch information...
commit d9d12a8a8744d21d9d6c0a8b6c6e9a4ef5d4220f 1 parent 451d121
@zenspider zenspider authored
Showing with 1 addition and 3 deletions.
  1. +1 −1  lib/flog.rb
  2. +0 −2  lib/flog_cli.rb
View
2  lib/flog.rb
@@ -110,6 +110,7 @@ class Flog < SexpProcessor
# Spankings!
def add_to_score name, score = OTHER_SCORES[name]
+ return if option[:methods] and method_stack.empty?
@calls[signature][name] += score * @multiplier
end
@@ -386,7 +387,6 @@ def calculate_total_scores
@totals = Hash.new(0)
calls.each do |meth, tally|
- next if option[:methods] and meth =~ /##{@@no_method}$/
score = score_method(tally)
@totals[meth] = score
View
2  lib/flog_cli.rb
@@ -175,8 +175,6 @@ def output_details io, max = nil
io.puts
each_by_score max do |class_method, score, call_list|
- return 0 if option[:methods] and class_method =~ /##{no_method}/
-
self.print_score io, class_method, score
if option[:details] then

0 comments on commit d9d12a8

Please sign in to comment.
Something went wrong with that request. Please try again.