tinyactors lint
Find what cannot work as written in charts.
Usage
tinyactors lint [options] INPUT...Reads the charts' states, transitions, raises and sends without running them. Reports what cannot do what it is written for, by rule. unreachable: a state no path enters. dead-end: a state an actor never leaves. never-ends: a state from which no final state is reachable. shadowed: a transition an earlier one always takes first. eventless-loop: an eventless transition taken without end. unhandled-event: raised or sent to a chart of the image that handles it nowhere. unsent-event: with several charts, handled but sent by nothing in the image. unknown-events: a computed event may arrive, so unsent-event is not checked. send-target: a static target no send can reach. search-limit: the search stopped at its limit, so never-ends is not checked.
Options
-W, --warnings-as-errorsRefuse a chart that compiles with a warning.-I, --include DIRSearchDIRfor a src that is not beside the file naming it, in the order given. Repeatable.-c, --chart NAMELook at the chart namedNAMEonly. Repeatable.-s, --segment NRead the image that segment N of a snapshot runs. Default: the newest live segment.-d, --deny RULEExit with 1 whenRULEfinds something; all names every rule. Repeatable.-a, --allow RULELeave out the findings ofRULE; all leaves out every rule's. Repeatable.
Configure output formats like -f json using the shared options on the command reference.
Examples
tinyactors lint order.scxml# Lint
- **Warnings**: 0
- **Notes**: 0
- **Denied**: 0
## Findings
_none_Lint a chart.
tinyactors lint --deny all --allow unsent-event system.xml# Lint
- **Warnings**: 0
- **Notes**: 0
- **Denied**: 0
## Findings
_none_Fail on a finding of every rule but unsent-event.
tinyactors lint -f json --chart payment shop.tai{
"warnings": 0,
"notes": 4,
"denied": 0,
"findings": [
{
"rule": "unsent-event",
"severity": "note",
"chart": "payment",
"state": "pending",
"transition": "authorize → authorized",
"event": "authorize",
"line": 0,
"message": "nothing in the image raises or sends it to payment: only the application can"
},
{
"rule": "unsent-event",
"severity": "note",
"chart": "payment",
"state": "pending",
"transition": "decline → declined",
"event": "decline",
"line": 0,
"message": "nothing in the image raises or sends it to payment: only the application can"
},
{
"rule": "unsent-event",
"severity": "note",
"chart": "payment",
"state": "authorized",
"transition": "capture → settled",
"event": "capture",
"line": 0,
"message": "nothing in the image raises or sends it to payment: only the application can"
},
{
"rule": "unsent-event",
"severity": "note",
"chart": "payment",
"state": "authorized",
"transition": "void → declined",
"event": "void",
"line": 0,
"message": "nothing in the image raises or sends it to payment: only the application can"
}
]
}Lint one chart of an image as JSON.
Exit status
1An input is refused: it does not compile or verify, or it is damaged or of an unknown format.1A rule given to--denyfinds something.3A file cannot be read or written, or memory runs out.
Related pages
- CI checks
tinyactors compileCompile charts or a system manifest into an image.tinyactors checkCheck that charts compile or that an image verifies.tinyactors fmtRewrite charts and system manifests in the canonical layout.