dev gate
Run the verification gate's checks and report each one's outcome and duration
- Command version
0.0.0- Command configuration
dev-tool:dev.gate@0.0.0
Arguments
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
--recurse, --no-recurse | boolean | No | false | Run each check across the repositories this one pins: --recurse is added to every check whose command declares it, and how each crosses is that command's own --recurse-mode, as its argDefaults state it. A check whose command takes no such flag reads the tree the way it always does. Without it every check covers this repository alone |
--all, --no-all | boolean | No | false | Run every check the gate holds, wherever each is placed. Without it or --ci the checks placed ci are not run, and the report names them. Refused with --ci |
--ci, --no-ci | boolean | No | false | Run the checks placed both and ci, and leave out the ones placed local, which the report names. --only then names checks among the ones that run: a local check it names is still left out |
--only | list[string] | No | [] | Run only the checks of these commands, each named as it is invoked -- lint, type check -- wherever each is placed, except that under --ci one placed local is still left out. A command the gate does not hold is refused, and so is --only with --skip. It is how one part of a gate is run on its ownRepeatable |
--skip | list[string] | No | [] | Leave out the checks of these commands, named as --only names them, and run the rest. The other half of a gate that --only ran part of somewhere elseRepeatable |
--paths | list[string] | No | [] | Narrow every check that runs to these paths, relative to the repository root: each is given them as its own --paths. A check whose command takes no --paths cannot be narrowed and would run whole under a request for part, so the run is refused naming it; pass --only with the checks that read a pathRepeatable |
--check, --no-check | boolean | No | false | Refuse a gate that wrote to the working tree. format and lint --fix repair what they find, which suits a run after an edit and not a run judging finished work: a gate that repaired the tree and passed has reported the opposite of what it found. With this the working tree is read before the checks and after them -- what git reports as changed, and the change itself, across every pinned checkout -- and a difference fails the gate as GATE_WROTE_TO_THE_TREE, naming what moved |
--dry-run, --no-dry-run | boolean | No | false | Run nothing, and report the checks this run would have run: each by its name, the command it is of and whether that command takes --paths, with the checks it leaves out named as any run names them |
It also takes the global arguments.
Output
It answers with a gate.gateReport.
Types
gate.gateReport
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
dryRun | boolean | No | false | Whether this was a dry run (--dry-run), which runs no check and reports planned. |
planned | list[gate.gatePlanned] | No | [] | The checks a dry run would have run, in the order it would have run them. Empty for a run that ran its checks, which reports them as checks. |
checks | list[gate.gateCheck] | No | [] | Every check the gate holds, in the order it ran them. All of them run, whatever an earlier one answered. |
failedCount | integer | No | 0 | How many checks failed. |
durationMs | integer | No | 0 | How long the whole gate took, in whole milliseconds. |
recurse | boolean | No | false | Whether the checks ran across the repositories this one pins. |
leftToCi | list[string] | No | [] | The checks the gate holds and this run left to CI, as the list names them: the ones placed ci, in a run with neither --ci nor --all. |
leftToLocal | list[string] | No | [] | The checks the gate holds and this run left to a session's gate, as the list names them: the ones placed local, in a run with --ci. |
written | list[string] | No | [] | What the checks changed in the working tree, as git status names each path, for a run asked to refuse a gate that writes (--check). Empty for a gate that left the tree as it found it, and for a run that did not ask. |
gate.gatePlanned
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | The check as the repository's gate list states it. | |
command | string | Yes | The command the check is of, as it is invoked, which is what --only and --skip name. | |
takesPaths | boolean | Yes | Whether the command takes --paths, so the check can be narrowed to part of a repository. |
gate.gateCheck
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | The check as the repository's gate list states it, which is what it is called wherever it is reported. | |
outcome | enum one of passed, failed | Yes | Whether the check passed. A check that could not be started failed. | |
exitCode | integer | Yes | The exit code the check's process ended with. | |
durationMs | integer | Yes | How long the check took, in whole milliseconds, from starting its process to its exit. | |
output | string | No | "" | The end of what a failed check wrote, both streams in the order they were written. Empty for a check that passed: its output reached the console as it ran, and a report carrying every passing check's output is one nobody reads the verdict out of. |