mirror of
https://github.com/correl/rebar.git
synced 2024-11-14 19:19:30 +00:00
Fix cover print truncation when coverage is 100%
When the option {cover_print_enabled, true} is set and that the code coverage is 100%, the '%' will end up being truncated. This patch makes it so that the truncation happens at 4 a characters width so that instead of the following printouts: some_mod : 99% some_other: 100 We instead show: some_mod : 99% some_other: 100% This solves issue #331 as reported by @lispking and @NineFX.
This commit is contained in:
parent
9c7dae7e25
commit
6f7e70edee
1 changed files with 1 additions and 1 deletions
|
@ -238,7 +238,7 @@ print_coverage(Coverage) ->
|
|||
%% Print the output the console
|
||||
?CONSOLE("~nCode Coverage:~n", []),
|
||||
lists:foreach(fun({Mod, C, N}) ->
|
||||
?CONSOLE("~*s : ~3s~n",
|
||||
?CONSOLE("~*s : ~4s~n",
|
||||
[Width, Mod, percentage(C, N)])
|
||||
end, Coverage),
|
||||
?CONSOLE("~n~*s : ~s~n", [Width, "Total", TotalCoverage]).
|
||||
|
|
Loading…
Reference in a new issue