ソースを参照

erlang r15x (and possibly earlier) don't put the correct path to

source files in the `compile` key of `module_info/1` so `rebar cover`
struggles locating source in some instances. in these cases a warning
is printed and crappy coverage info is written rather than none at all
pull/202/head
alisdair sullivan 10年前
コミット
af7ba345fa
1個のファイルの変更3行の追加0行の削除
  1. +3
    -0
      src/rebar_prv_cover.erl

+ 3
- 0
src/rebar_prv_cover.erl ファイルの表示

@ -250,6 +250,9 @@ write_index_section(F, [{Section, DataFile, Mods}|Rest]) ->
ok = file:write(F, "</table>\n"),
write_index_section(F, Rest).
%% fix for r15b which doesn't put the correct path in the `source` section
%% of `module_info(compile)`
strip_coverdir([]) -> "";
strip_coverdir(File) ->
filename:join(lists:reverse(lists:sublist(lists:reverse(filename:split(File)),
2))).

読み込み中…
キャンセル
保存