rrrene / credo

A static code analysis tool for the Elixir language with a focus on code consistency and teaching.
http://credo-ci.org/
MIT License
4.91k stars 414 forks source link

Issue with Unused variables confused about the strategy #1110

Closed epinault closed 7 months ago

epinault commented 7 months ago

Environment

What were you trying to do?

I am trying to not have variable using . at all. I using the UnusedVariablesName check and despite fixing all my files to not have. it s still complaining about this. 2 different version of credo and same issue.

Expected outcome

no warnings and not complaining about the strategy. If anything, I picked latter way (naming them)

Actual outcome

it s constantly showing those errors, wether locally or in my CI that uses linux too and and same version as above

[C] ↗ lib/outbox/message.ex:60:7 Unused variables should be named consistently. It seems your strategy is to name them anonymously (ie. _) but _val does not follow that convention. [C] ↗ lib/outbox/relay.ex:257:11 Unused variables should be named consistently. It seems your strategy is to name them anonymously (ie. _) but _res does not follow that convention. [C] ↗ lib/outbox/testhelpers.ex:37:7 Unused variables should be named consistently. It seems your strategy is to name them anonymously (ie. `) but_error` does not follow that convention.

epinault commented 7 months ago

I see that I can force it. seems that I had missed some and the count must be close enough that. It was not making sense . Closing as non issue at this point