I usually use _fallback
in such cases.
This is all fair. I’m all for code consistency and I do use Credo and I was also a RuboCop user for a long time. I think adjustments for team preferences are totally fine so long as you have a process for introducing new rules (as you mentioned). The Elixir community seems to be more accepting of different styles, though, so for me I just consider the formatter law (though many people don’t use it). My problem with linters is exactly what you were saying in your first post: it doesn’t leave room for “it depends” situations where breaking the rules in certain cases makes sense. Of course it would be fairly trivial to write a Credo rule to allow _
for case
catch-alls. Same for side-effect throw-aways which I would be extra annoyed to have to name. I actually really like this pattern to mark a call as effectful. It would be super annoying to have _throwaway = fetch()
or _effect = fetch()
everywhere. Like very quickly you’re going to be like, “Uh, ya, duh!”
But yes, I’m getting very bikesheddy here I was on this really amazing team and anything low-stakes like this that came up was decided in minutes or less, so like, I gotta bikeshed somewhere