Mailglass.Credo.NoRawSwooshSendInLib (Mailglass 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

Mailglass library code must send through Mailglass.Outbound.*, not Swoosh.Mailer.deliver* directly.

Check-Specific Parameters

Use the following parameters to configure this check:

:allowed_modules

Modules explicitly allowed to call Swoosh.Mailer.deliver*.

This parameter defaults to [Mailglass.Adapters.Swoosh].

:included_path_prefixes

Only files in these path prefixes are linted.

This parameter defaults to ["lib/mailglass/"].

:forbidden_functions

Swoosh.Mailer function names that are disallowed.

This parameter defaults to [:deliver, :deliver!, :deliver_many].

General Parameters

Like with all checks, general params can be applied.

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