Closed elbrujohalcon closed 3 years ago
Done! Now it should ignore the following examples:
hank_should_ignore_this_function_unused_params(_Ignore, _Me) ->
erlang:nif_error(undefined).
and_also_this_one(_Ignore, Me, _Too) ->
mylog:info(Me), % This line should not affect anything!
erlang:nif_error(undefined, []).
and_this_one_too(_Ignore, _Me, Again) ->
Msg = case Again of
something -> "A message!";
_ -> "Another message!"
end,
erlang:nif_error(Msg, [ignore, Again]).
even_with_multiple_clauses(A, B) -> A + B;
even_with_multiple_clauses(_, _) -> erlang:nif_error(no_warnings).
Describe the bug When defining a NIF, we need to write an Erlang function that will just raise an exception if used. Hank finds it and emits a warning for each one of its paramters.
To Reproduce Analyze a module with this function…
Expected behavior No warnings.