diff --git a/apps/rebar/src/rebar_compiler_format.erl b/apps/rebar/src/rebar_compiler_format.erl index 3f34cc6db..a8992a67b 100644 --- a/apps/rebar/src/rebar_compiler_format.erl +++ b/apps/rebar/src/rebar_compiler_format.erl @@ -15,11 +15,11 @@ format(Source, {Line, Column}, Extra, Desc, Config) -> case CompilerErrFmt == rich andalso find_line(Line, Source) of {ok, LnBin} -> LnPad = lists:duplicate(length(integer_to_list(Line)), " "), - Arrow = cf:format("~!R~ts~!!",["^--"]), + Arrow = cf:format("~!R~ts~!!",["╰──"]), ?FMT(" ~ts ┌─ ~ts:~n" - " ~ts |~n" - " ~w | ~ts~n" - " ~ts | ~s~ts ~ts~ts~n~n", + " ~ts │~n" + " ~w │ ~ts~n" + " ~ts │ ~s~ts ~ts~ts~n~n", [LnPad, Source, LnPad, Line, colorize(LnBin, Column), diff --git a/apps/rebar/test/rebar_compiler_format_SUITE.erl b/apps/rebar/test/rebar_compiler_format_SUITE.erl index fe039e46a..e35f5b888 100644 --- a/apps/rebar/test/rebar_compiler_format_SUITE.erl +++ b/apps/rebar/test/rebar_compiler_format_SUITE.erl @@ -67,19 +67,19 @@ nocolor(Config) -> Path = ?config(file, Config), Conf = ?config(conf, Config), ?assertEqual(" ┌─ "++Path++":"++?EOL++ - " |"++?EOL++ - " 1 | -module(noline_end);"++?EOL++ - " | ^-- => unexpected token: ;"++?EOL++?EOL, + " │"++?EOL++ + " 1 │ -module(noline_end);"++?EOL++ + " │ ╰── => unexpected token: ;"++?EOL++?EOL, rebar_compiler_format:format(Path, {1,20}, "=> ", "unexpected token: ;", Conf)), ?assertEqual(" ┌─ "++Path++":"++?EOL++ - " |"++?EOL++ - " 11 | first character on line 11."++?EOL++ - " | ^-- some message"++?EOL++?EOL, + " │"++?EOL++ + " 11 │ first character on line 11."++?EOL++ + " │ ╰── some message"++?EOL++?EOL, rebar_compiler_format:format(Path, {11,1}, "", "some message", Conf)), ?assertEqual(" ┌─ "++Path++":"++?EOL++ - " |"++?EOL++ - " 111 | case X of ^whatever % on line 111"++?EOL++ - " | ^-- the character '^' is not expected here."++?EOL++?EOL, + " │"++?EOL++ + " 111 │ case X of ^whatever % on line 111"++?EOL++ + " │ ╰── the character '^' is not expected here."++?EOL++?EOL, rebar_compiler_format:format(Path, {111,11}, "", "the character '^' is not expected here.", Conf)), %% invalid cases fall back to minimal mode ?assertEqual(Path++":-23:-42: invalid ranges."++?EOL,