Credo.CLI.Command.init
You're seeing just the callback
init
, go back to Credo.CLI.Command module for more information.
Specs
init(exec :: Credo.Execution.t()) :: Credo.Execution.t()
Is called when a Command is initialized.
The init/1
functions receives an exec
struct and must return a (modified) Credo.Execution
.
This can be used to initialize Execution pipelines for the current Command:
defmodule FooTask do
use Credo.Execution.Task
def init(exec) do
Execution.put_pipeline(exec, __MODULE__,
run_my_thing: [
{RunMySpecialThing, []}
],
filter_results: [
{FilterResults, []}
],
print_results: [
{PrintResultsAndSummary, []}
]
)
end
end