Credo.Execution.Task.call

You're seeing just the callback call, go back to Credo.Execution.Task module for more information.

Specs

call(exec :: Credo.Execution.t()) :: Credo.Execution.t()

Is called by the pipeline and contains the Task's actual code.

defmodule FooTask do
  use Credo.Execution.Task

  def call(exec) do
    IO.inspect(exec)
  end
end

The call/1 functions receives an exec struct and must return a (modified) Credo.Execution.

Specs

call(exec :: Credo.Execution.t(), opts :: Keyword.t()) :: Credo.Execution.t()

Works like call/1, but receives the options, which are optional when registering the Task, as second argument.

defmodule FooTask do
  use Credo.Execution.Task

  def call(exec, opts) do
    IO.inspect(opts)

    exec
  end
end