Skip to content

Commit

Permalink
fix behaviour_info call in try-catch
Browse files Browse the repository at this point in the history
  • Loading branch information
bormilan committed Nov 10, 2024
1 parent b27b8a5 commit 6b1a1c8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/elvis_style.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1500,8 +1500,13 @@ get_behaviour_callbacks(Root) ->
BehaviourNames =
lists:map(fun(#{attrs := #{value := Behaviour}}) -> Behaviour end, Behaviours),

lists:append(
lists:map(fun(B) -> apply(B, behaviour_info, [callbacks]) end, BehaviourNames)).
try lists:map(fun(B) -> apply(B, behaviour_info, [callbacks]) end, BehaviourNames) of
DeepList ->
lists:append(DeepList)
catch
_ ->
[]
end.

get_type_of_type(#{type := type_attr,
node_attrs := #{type := #{attrs := #{name := TypeOfType}}}}) ->
Expand Down

0 comments on commit 6b1a1c8

Please sign in to comment.