Configure Credo to use global .credo.exs file

Several projects are being added under the same umbrella project, and some of them leverage credo.

The docs mention that:

Credo is configured via a file called .credo.exs. This file can live in your project’s config/ or root folder, both is fine.

In the sub-apps, how can Credo be configured to use the same, global .credo.exs file, say from the root of the umbrella project?

Easiest would be to symlink it for now and file an issue at credits Github page requesting this feature.

I’m doing this in ibGib with placing the credo file in the umbrella’s config directory and installing credo as a dependency in the individual apps. I don’t think there is anything else to configure it, but I’m not finding where documentation says to do this.

Works like a charm (just changed the function arity max yesterday). :smile:

1 Like

For more context:

Credo traverses your tree back up until your home dir. At each step of the way it looks for ./.credo.exs as well as ./config/.credo.exs. It then merges those configs recursively, with those “nearer” to your cwd taking precedence.

1 Like

I edited the README to reflect the umbrella use case:

1 Like