Fix error reporting in 'make options' on OTP24+

This commit is contained in:
Paweł Chmielowski 2022-06-24 11:36:54 +02:00
parent 06147deccd
commit 991d52f019
1 changed files with 5 additions and 1 deletions

View File

@ -483,8 +483,12 @@ options_required([Form]) ->
proplists:get_value(required, Opts, []).
format_file(Path, Form) ->
Line = case erl_syntax:get_pos(Form) of
{L, _} -> L;
L -> L
end,
filename:rootname(filename:basename(Path)) ++ ".erl:" ++
integer_to_list(erl_syntax:get_pos(Form)).
integer_to_list(Line).
module(Path) ->
list_to_atom(filename:rootname(filename:basename(Path))).