# `mix surfex.check`
[🔗](https://github.com/dcoai/surfex/blob/v0.10.0/lib/mix/tasks/surfex.check.ex#L1)

Runs the checks `.surfex.exs` declares (`checks:`, §11.4) and records each result as
evidence (§17.1), in the file the test formatter writes (`Surfex.Evidence.path/1`):

    mix surfex.check                 # every check
    mix surfex.check no-rescue       # these checks
    mix surfex.check --list          # name them; run nothing

Each check's command runs in the project's root with the system's shell. Exit status 0
is passed, anything else failed, recorded at the check's declaration's version against
its inputs' versions. A check discriminates as a test does: once its declaration has
failed against one set of inputs and passed against another, `mix surfex.confirm
--evidence` confirms its `verifies` relations. Deliberately breaking an input to show it
fails is that discrimination run.

The task exits non-zero when any check failed, so it is also the gate. An unknown id, or
a project with no checks, is an error before anything runs. `--evidence PATH` records
to another file (a CI job's artifact).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
