Maru.Params (maru_params v0.2.15)

Copy Markdown

Runtime verification of include.

include never touches the included module at compile time, so nothing about it can be checked while compiling. verify_all/1 runs those checks at runtime instead, call it from Application.start/2 or from a test:

Maru.Params.verify_all([:my_app])

For every params block of every module of those applications it asserts that every included module is a Maru.Params.Schema, that the block names given to :only / :except exist, and that every name of the included module's reads: is declared before the include at the same level.

Summary

Functions

Verify every include of every module of the given applications.

Verify every include of the given modules, see verify_all/1.

Functions

verify_all(apps)

Verify every include of every module of the given applications.

Returns :ok or raises with all found problems.

verify_modules(modules)

Verify every include of the given modules, see verify_all/1.

Modules without params blocks are ignored.