OptimumCredo.Check.Warning.SleepOutsideTest (OptimumCredo v0.5.0)
View SourceBasics
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
Avoid Process.sleep/1 and :timer.sleep/1 outside tests. Prefer messages, timers
(Process.send_after/3), or an explicit retry/backoff library. sleep(:infinity) is
allowed. Opt-in, low priority.
Check-Specific Parameters
Use the following parameters to configure this check:
:ignore_paths
Directory (ending in /) or file-suffix patterns to skip.
This parameter defaults to ["test/", "priv/", "_test.exs"].
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs config file.