Skip to content

Commit

Permalink
fixup! Quote source as part of error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
richcarl committed Feb 8, 2021
1 parent 16de599 commit bd1675b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/stdlib/src/erl_lint.erl
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,7 @@ format_mna({M, N, A}) when is_integer(A) ->
format_where(L) when is_integer(L) ->
io_lib:format("(line ~p)", [L]);
format_where({L,C}) when is_integer(L), is_integer(C) ->
io_lib:format("(line ~p, column ~p)", [L, C]);
format_where(Anno) ->
format_where(erl_anno:location(Anno)).
io_lib:format("(line ~p, column ~p)", [L, C]).

%% Local functions that are somehow automatically generated.

Expand Down Expand Up @@ -707,12 +705,7 @@ add_lint_warning(W, File, St) ->
St#lint{warnings=[{File,W}|St#lint.warnings]}.

loc(Anno, St) ->
Location0 = erl_anno:location(Anno),
Location = case erl_anno:end_location(Anno) of
undefined -> Location0;
EndLoc -> [{location, Location0},
{end_location, EndLoc}]
end,
Location = erl_anno:location(Anno),
case erl_anno:file(Anno) of
undefined -> {St#lint.file,Location};
File -> {File,Location}
Expand Down

0 comments on commit bd1675b

Please sign in to comment.