witchcrafters / witchcraft

Monads and other dark magic for Elixir
https://witchcrafters.github.io
MIT License
1.2k stars 58 forks source link

Bring in line with latest community standards #103

Open expede opened 2 years ago

expede commented 2 years ago

Credo now warns by default on use of Apply.apply, and piping into anonymous functions. We should consider making these not conflict out of the box.

{Credo.Check.Readability.PipeIntoAnonymousFunctions, false},

This rule incorrectly flags uses of Witchcraft.Semigroupoid.apply/2

{Credo.Check.Refactor.Apply, false}

See https://github.com/witchcrafters/witchcraft/pull/102#discussion_r790418438

QuinnWilton commented 2 years ago

To clarify, Credo specifically warns on cases where apply/2 is used with a list of known size. Credo argues that if you can know the number of arguments at compile time, then you should just call the function directly, with apply/2 being reserved for more dynamic uses.

I agree that finding a way to avoid this warning would be worthwhile though!