View Source Credo.Check.Refactor.PipeChainStart (Credo v1.6.4)

This check has a base priority of 0 and works with any version of Elixir.

Explanation

Pipes (|>) can become more readable by starting with a "raw" value.

So while this is easily comprehendable:

list
|> Enum.take(5)
|> Enum.shuffle
|> pick_winner()

This might be harder to read:

Enum.take(list, 5)
|> Enum.shuffle
|> pick_winner()

As always: This is just a suggestion. Check the configuration options for tweaking or disabling this check.

Check-Specific Parameters

Use the following parameters to configure this check:

:excluded_functions

All functions listed will be ignored.

This parameter defaults to [].

:excluded_argument_types

All pipes with argument types listed will be ignored.

This parameter defaults to [].

General Parameters

Like with all checks, general params can be applied.

Parameters can be configured via the .credo.exs config file.