KogenCredo.Check.Warning.ForbiddenCall (KogenCredo v0.1.0)

View Source

Basics

This check is disabled by default.

Learn how to enable it via .credo.exs.

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

Explanation

Calls that mutate global state (System.put_env, File.cd!), sleep for a fixed time or bypass an injected port should be impossible to add silently. Configure rules with the exact calls, a message that says what to use instead, and optional paths/allow scopes.

Check-Specific Parameters

Use the following parameters to configure this check:

:rules

List of rules: calls, message, optional paths and allow (see moduledoc).

This parameter defaults to [].

:presets

Built-in rule sets to add. Supported: :async_safe_tests.

This parameter defaults to [].

:preset_allow

Path prefixes exempt from preset rules.

This parameter defaults to ["test/support/"].

General Parameters

Like with all checks, general params can be applied.

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