For a long time at work, our team included
Credo.Check.Readability.SinglePipe in our Credo checks.
It enforces this rule:
Use a function call when a pipeline is only one function long
I didn’t like that; I’d rather use my own judgment there.
I especially saw issues when
allow_functions: true wasn’t set to allow 0-arity functions, or when piping the result of an Ecto query to something like
Thankfully, this rule has been removed from the default Credo rules. Our team noticed and stopped using it.
But not before I made a song.
I don’t like to brag, but this will probably be among the top 10 songs about Elixir code formatting you’ll hear today.