ReferenceCLI commands
sdods lint
Validate feature files against Gherkin syntax, the tag taxonomy, module rules and step definitions.
sdods lint [paths...] [-p <slug>] [--undefined-steps] [--fix-tags] [--strict] [--file <path>]...| Flag | Meaning |
|---|---|
-p, --project <slug> | project slug (default: every project) |
--undefined-steps | also detect undefined steps through bddgen (slower) |
--fix-tags | insert the layer or module tag suggested by a finding |
--strict | treat warnings as errors |
--file <path> | lint only this feature file; repeatable |
Rules:
| Rule | Severity |
|---|---|
| Gherkin parse error | error |
not exactly one layer tag (@ui, @api, @hybrid) | error |
not exactly one suite tag from tags.suites | error |
@user:, @data:, @env:, @har:, @skip: value unknown to the project | error |
@jira: / @github: pattern invalid | error |
@req: id not in traceability.requirements (when set) | error |
scenario without @req: while traceability.require is true | error |
traceability.requirements file missing or unreadable | error |
| duplicate scenario titles in a feature | error |
| undefined step | error, only with --undefined-steps |
Scenario Outline without a # title-format: comment | warning |
| unknown tag | warning |
| feature outside every declared module directory | warning |
| scenario lacks a tag its module expects | warning |
| unused step definition | warning |
@matrix:<name> unknown, or no roles.matrix.yaml | error |
roles.matrix.yaml invalid, or a matrix role not in tags.roles | error |
@matrix: template misplaced, or uses a placeholder the matrix lacks | error |
matrix feature out of date (matrix/stale) | warning |
| matrix role with no user-pool account for an environment | warning |
Matrix rules are described in sdods matrix.
sdods run lints first unless --no-lint is given. Exit code 3 on errors.
bun run sdods lint -p demo-shop
bun run sdods lint -p demo-shop --undefined-steps --strict