# `Aludel.Evals.Reporter`
[🔗](https://github.com/ccarvalho-eng/aludel/blob/main/lib/aludel/evals/reporter.ex#L1)

Renders evaluation reports for people and CI systems.

The built-in reporter names are `:console`, `:json`, `:junit`, and
`:github`. A custom module can also be passed directly when it implements
this module's callback.

    {:ok, output} = Aludel.Evals.Reporter.render(suite_run, :junit)

Reporter options are passed to the selected implementation. The JSON
reporter, for example, accepts `pretty: true`.

# `error`

```elixir
@type error() :: :unknown_reporter | :invalid_reporter_output
```

A stable error returned before or while rendering a report.

# `reporter`

```elixir
@type reporter() :: :console | :json | :junit | :github | module()
```

A built-in reporter name or a custom reporter module.

# `render`

```elixir
@callback render(Aludel.Evals.Report.t(), keyword()) :: {:ok, iodata()} | {:error, term()}
```

# `render`

```elixir
@spec render(
  Aludel.Evals.SuiteRun.t() | Aludel.Evals.Report.t(),
  reporter(),
  keyword()
) ::
  {:ok, String.t()} | {:error, error() | term()}
```

Renders a suite run with a built-in or custom reporter.

# `render!`

```elixir
@spec render!(
  Aludel.Evals.SuiteRun.t() | Aludel.Evals.Report.t(),
  reporter(),
  keyword()
) :: String.t()
```

Renders a report and raises `ArgumentError` when rendering fails.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
