ZebbraCredo.Check.ForbiddenCalls (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

Some modules and functions belong to one place: the token resource and direct PubSub subscriptions stay out of the web, AshOban.run_trigger is replaced by change run_oban_trigger, only LogSubscribers log, the clock is read in one module and HTTP leaves through one door. The rules name the module, the functions and the files allowed to use them.

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; turns on the house rules. Without it only rules: apply.

This parameter defaults to nil.

:web

The app's web namespace when it is not <app>Web.

This parameter defaults to nil.

:except

Keys of the house rules to leave out, see ZebbraCredo.Presets.ForbiddenCalls.keys/0.

This parameter defaults to [].

:rules

The project's own rules, added to the house rules: [module:, functions:, except:, allowed:, only:, message:] each.

This parameter defaults to [].

General Parameters

Like with all checks, general params can be applied.

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