CredoTesting gives you a Credo check to ensure all your modules have a corresponding test file.
Append the check into your .credo.exs
file:
[
# ... other checks
# ...
{CredoTesting.Check.Warning.EnsureTestFileExistsForModule, []}
]
You can specify a list of paths to ignore the validation:
[
# ...
{CredoTesting.Check.Warning.EnsureTestFileExistsForModule, excluded_paths: ["lib/my_app/application.ex", "lib/my_app_web/openapi_specs"]}
]
The package can be installed by adding credo_testing
to your list of dependencies in mix.exs
:
def deps do
[
{:credo_testing, "~> 1.0.0"}
]
end