Skip to content

Commit f6dc4ab

Browse files
authored
Merge pull request #125 from cntral/put_coverage_percentage_first
Improve clarity of line and branch coverage format.
2 parents a10a3a9 + e2b0025 commit f6dc4ab

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/simplecov-html.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ def format(result)
3838
end
3939

4040
def output_message(result)
41-
str = "Coverage report generated for #{result.command_name} to #{output_path}. #{result.covered_lines} / #{result.total_lines} LOC (#{result.covered_percent.round(2)}%) covered."
42-
str += " #{result.covered_branches} / #{result.total_branches} branches (#{result.coverage_statistics[:branch].percent.round(2)}%) covered." if branchable_result?
43-
str
41+
output = "Coverage report generated for #{result.command_name} to #{output_path}."
42+
output += "\nLine Coverage: #{result.covered_percent.round(2)}% (#{result.covered_lines} / #{result.total_lines})"
43+
output += "\nBranch Coverage: #{result.coverage_statistics[:branch].percent.round(2)}% (#{result.covered_branches} / #{result.total_branches})" if branchable_result?
44+
output
4445
end
4546

4647
def branchable_result?

0 commit comments

Comments
 (0)