# `Ambient.Credo.NoDirectConfig`
[🔗](https://github.com/mariuszzak/ambient/blob/v0.2.0/lib/ambient/credo/no_direct_config.ex#L3)

## Basics

> #### This check is disabled by default. {: .neutral}
>
> [Learn how to enable it](`e:credo:config_file.html#checks`) via `.credo.exs`.

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

## Explanation

Direct runtime reads of your own app's config bypass the
`Ambient.Config` override layer and can't be set per-process in
`async: true` tests. Route through your Config module instead.

## Check-Specific Parameters

Use the following parameters to configure this check:

### `:otp_app`

  The OTP application whose config reads should be routed (required).

*This parameter defaults to* `nil`.

### `:replacement`

  Your Config module name, shown in the message (e.g. "MyApp.Config").

*This parameter defaults to* `nil`.

### `:exempt_suffixes`

  File path suffixes exempt from the check.

*This parameter defaults to* `[]`.

## General Parameters

Like with all checks, [general params](`e:credo:check_params.html`) can be applied.

Parameters can be configured via the [`.credo.exs` config file](`e:credo:config_file.html`).

---

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