EctoContext.Check.Helpers (EctoContext v0.3.1)

Copy Markdown View Source

Shared helpers for EctoContext Credo checks.

Summary

Functions

Returns the short atom names of the configured Repo modules.

Functions

configured_repo_aliases(params)

Returns the short atom names of the configured Repo modules.

Reads :repos from params if provided, otherwise falls back to the app's :ecto_repos config. Returns the last segment of each module as an atom — e.g. [MyApp.Repo, MyApp.ReadonlyRepo] becomes [:Repo, :ReadonlyRepo]. These are the names that appear at aliased call sites in the AST.