Skip to content

Commit

Permalink
Add Line to relevant calls (inaka#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsolt Laky committed Jun 10, 2024
1 parent 1764ff1 commit ceb0cb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/elvis_style.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ no_throw(Config, Target, RuleConfig) ->
ThrowNodes = elvis_code:find(Zipper, Root),
lists:foldl(fun(ThrowNode, AccIn) ->
{Line, _} = ktn_code:attr(location, ThrowNode),
[elvis_result:new(item, ?NO_THROW_MSG, [Line]) | AccIn]
[elvis_result:new(item, ?NO_THROW_MSG, [Line], Line) | AccIn]
end,
[],
ThrowNodes).
Expand All @@ -1040,7 +1040,7 @@ no_dollar_space(Config, Target, RuleConfig) ->
DollarSpaceNodes = elvis_code:find(IsDollarSpace, Root, Opts),
lists:map(fun(ThrowNode) ->
{Line, _} = ktn_code:attr(location, ThrowNode),
elvis_result:new(item, ?NO_DOLLAR_SPACE_MSG, [Line])
elvis_result:new(item, ?NO_DOLLAR_SPACE_MSG, [Line], Line)
end,
DollarSpaceNodes).

Expand Down Expand Up @@ -1079,7 +1079,7 @@ no_catch_expressions(Config, Target, RuleConfig) ->
CatchNodes = elvis_code:find(fun is_catch_node/1, Root),
lists:foldl(fun(CatchNode, Acc) ->
{Line, _Col} = ktn_code:attr(location, CatchNode),
[elvis_result:new(item, ?NO_CATCH_EXPRESSIONS_MSG, [Line]) | Acc]
[elvis_result:new(item, ?NO_CATCH_EXPRESSIONS_MSG, [Line], Line) | Acc]
end,
[],
CatchNodes).
Expand Down

0 comments on commit ceb0cb1

Please sign in to comment.