Jump. CredoChecks. DoctestIExExamples
(Jump.CredoChecks v0.3.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 normal and works with any version of Elixir.
Explanation
Modules that contain interactive Elixir examples (iex>) in their
@doc or @moduledoc attributes should have those examples exercised
via doctest in a corresponding test file.
For a file at lib/jump/foo.ex defining Jump.Foo, this check expects
a sibling test file lib/jump/foo_test.exs that contains:
doctest Jump.FooWithout this, the examples are just decoration — they won't be compiled or verified, and can silently drift out of date.
Check-Specific Parameters
There are no specific parameters for this check.
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs config file.