Open Artur-Sulej opened 1 month ago
The fact that the filename is nofilename
on this is definitely bad and we should fix that π (this is completely Credo's fault, I believe). Could you provide an Elixir module that produces this warning?
I'd like credo to detect this ambiguity issue and add a suggestion about it to its output.
On this I am sorry, because we can not re-implement compiler checks/warnings as standard checks in Credo. Doubling the compiler's functionality would be like implementing our own formatter.
This of course does not say that this wouldn't be a great custom check or plugin, which we could also feature in the docs on how to implement custom checks π―
Precheck
Environment
mix credo -v
): 1.7.3elixir -v
): 1.16.2/OTP 26What were you trying to do?
I'm running
mix credo --strict
and getting this warning:It happens because of this piece of code:
Expected outcome
I'd like
credo
to detect this ambiguity issue and add a suggestion about it to its output. That would be especially useful because the warning doesn't contain a correct path to the problematic code.Actual outcome
This issue doesn't appear in the output.