otp icon indicating copy to clipboard operation
otp copied to clipboard

[erl_lint] Simply display `name/arity` for type-related lint issues

Open robertoaloi opened this issue 7 months ago • 1 comments

The erl_lint module, when presenting errors related to types (e.g. when an undefined type is listed as part of the -export_type attribute) uses the following helper:

https://github.com/erlang/otp/blob/0e39c74a74c12a730dc6af5d33d10f7f479236be/lib/stdlib/src/erl_lint.erl#L611-L616

This causes error messages to look like this:

Image

I don't really see an advantage in not showing the actual arity of the type and, instead, generate placeholders for each parameter. This is also inconsistent with the undefined function error:

Image

Would you be open to convert all errors to simply use the name/arity format? If so, I can provide a PR.

robertoaloi avatar May 20 '25 14:05 robertoaloi

Would you be open to convert all errors to simply use the name/arity format? If so, I can provide a PR.

Sounds great, go ahead :-)

jhogberg avatar May 26 '25 10:05 jhogberg