lib/skunk/rubycritic/analysed_module.rb in skunk-0.3.0 vs lib/skunk/rubycritic/analysed_module.rb in skunk-0.3.1

- old
+ new

@@ -29,12 +29,12 @@ # When `churn_times_cost` is 100 and module is covered at 75%: # stink_score => 100 * 25 (percentage uncovered) = 2_500 # # @return [Float] def stink_score - return churn_times_cost.round(2) if coverage == PERFECT_COVERAGE + return cost.round(2) if coverage == PERFECT_COVERAGE - (churn_times_cost * (PERFECT_COVERAGE - coverage.to_i)).round(2) + (cost * (PERFECT_COVERAGE - coverage.to_i)).round(2) end # Returns the value of churn times cost. # # @return [Integer]