ZebbraCredo.Check.RawSql (zebbra_credo v1.0.0)

Copy Markdown View Source

Basics

This check is disabled by default.

Learn how to enable it via .credo.exs.

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

Explanation

Use an Ash action or expression. Where Ash cannot express it, add the file to the check's allowed: list with a comment saying why.

Check-Specific Parameters

Use the following parameters to configure this check:

:files

Files to check (Credo's included/excluded globs); defaults to lib/.

This parameter defaults to %{included: ["lib/"]}.

:app

The app's root module; its repo defaults to <app>.Repo.

This parameter defaults to nil.

:repo

The repo; its functions besides transaction/rollback/in_transaction? and repo_functions: send queries.

This parameter defaults to nil.

:allowed

File globs that may send raw SQL.

This parameter defaults to [].

:repo_functions

Repo functions that are not raw SQL.

This parameter defaults to [:all_tenants].

General Parameters

Like with all checks, general params can be applied.

Parameters can be configured via the .credo.exs config file.