From 4ae4a80219ba6d9404e8fd4666c45f77f3da9dd9 Mon Sep 17 00:00:00 2001 From: Philip Mueller Date: Wed, 12 Dec 2012 12:38:39 +0100 Subject: change cover html generation to produce valid html - added missing doctype - added encoding statement - removed invalid additional opening tag --- src/rebar_eunit.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl index b82da0f..c674ad9 100644 --- a/src/rebar_eunit.erl +++ b/src/rebar_eunit.erl @@ -524,7 +524,9 @@ align_notcovered_count(Module, Covered, NotCovered, true) -> cover_write_index(Coverage, SrcModules) -> {ok, F} = file:open(filename:join([?EUNIT_DIR, "index.html"]), [write]), - ok = file:write(F, "Coverage Summary\n"), + ok = file:write(F, "\n" ++ + "Coverage Summary\n" ++ + "\n"), IsSrcCoverage = fun({Mod,_C,_N}) -> lists:member(Mod, SrcModules) end, {SrcCoverage, TestCoverage} = lists:partition(IsSrcCoverage, Coverage), cover_write_index_section(F, "Source", SrcCoverage), @@ -542,7 +544,7 @@ cover_write_index_section(F, SectionName, Coverage) -> TotalCoverage = percentage(Covered, NotCovered), %% Write the report - ok = file:write(F, ?FMT("

~s Summary

\n", [SectionName])), + ok = file:write(F, ?FMT("

~s Summary

\n", [SectionName])), ok = file:write(F, ?FMT("

Total: ~s

\n", [TotalCoverage])), ok = file:write(F, "\n"), -- cgit v1.1
ModuleCoverage %