Skip to content

assay check [paths…]

Judges the project, or the given paths, with assay’s rules only: no SDK lint, and no cross-file, asset or project-file check. It honours the baseline.

assay check [paths…] [--no-baseline] [--reporter <name>[:<file>]]… [--color auto|always|never]

check runs assay’s own engine. It is neither of the two judgements: the gate also runs the SDK lints and the compiler’s warnings, so a passing check can be a failing gate.

Once the project has a baseline:

  • a violation the baseline knows is counted as known and does not fail;
  • an entry that no longer matches is removed from the baseline file as check runs, within the files it judged;
  • only the entries of assay’s rules are removed. The entries of the SDK lints and of the cross-file and project-file checks are left to the gate and assay baseline update.
Option Effect
paths… Judge only the files at and below these paths. A path outside the project, or one at which there is no file or directory, is a usage error.
--no-baseline Judge as if there were no baseline: every violation is shown and counts, and nothing is removed from the baseline.
--reporter <name>[:<file>] console (the default), json, sarif, gitlab, github or markdown, to standard output or to a file. Repeatable. See Commands.
--color auto|always|never The form of the console output, as for every command.
Terminal window
assay check # the whole project, against the baseline
assay check lib/src # the files at and below a path
assay check --no-baseline # every violation, known to the baseline or not
assay check --reporter json:build/check.json

check prints the report of every command that judges. The console report shows assay check --no-baseline on a project with three violations, and says what each box holds.

Against a baseline, the known violations are counted in the verdict box and not listed; --no-baseline lists them. The verdict box also says what the run removed from the baseline:

╭─ assay check ────────────────────────────────────────────────────────────────╮
│ Preset recommended │
│ Rules 109 │
│ Files 2 │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ ✓ PASS ─────────────────────────────────────────────────────────────────────╮
│ 0 blocking · 0 advisory · 0 of 2 files · 3 in the baseline │
│ ! 3 known violations in the baseline · listed by │
│ `assay check --no-baseline` │
│ Removed 1 entry that no longer matches from assay_baseline.json. │
╰──────────────────────────────────────────────────────────────────────────────╯

The other reporters are on Commands.

Code When
0 Pass. Advisory violations and violations the baseline knows do not fail.
1 Fail: a blocking violation that is not in the baseline, or a file that does not compile.
2 A configuration error: nothing is judged, and the report names each error. A baseline file that cannot be read is one. Or a usage error, which writes no result: a path outside the project or one at which nothing is, a reporter the command does not take, or two reporters given the same file.
3 assay could not run, or a report file or the baseline file could not be written. The other reports are still written, and standard error names the path and shows the verdict.