verdict validate
Check policy syntax, semantics and lint warnings without publishing it.
Runs locally. Effects: none declared.
Arguments and flags
Section titled “Arguments and flags”| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
<file> | positional | no | No parser default | Policy file override, relative to the current directory |
--config | string | no | No parser default | Project configuration path; otherwise discover it |
--json | boolean | no | false | Print a machine-readable validation result |
--skip-warnings | boolean | no | false | Omit warnings and exclude them from the exit status |
--allow-warnings | boolean | no | false | Report warnings without failing validation |
--help (-h) shows command help without executing the command. Boolean flags support --no-<flag>. Defaults stated in descriptions may be resolved by the handler or configuration rather than the argument parser.
Optional UTF-8 file path; defaults to the configured policy or policy.vd. ’-’ is an ordinary path.
File input: supported. Standard input: unsupported.
Result
Section titled “Result”{ "kind": "json-schema", "schema": { "type": "object", "required": [ "file", "valid", "ruleCount", "diagnostics" ], "additionalProperties": false, "properties": { "file": { "type": "string" }, "valid": { "type": "boolean" }, "ruleCount": { "anyOf": [ { "type": "integer" }, { "type": "null", "nullable": true } ] }, "diagnostics": { "type": "array", "items": { "type": "object", "required": [ "code", "severity", "message", "range" ], "additionalProperties": false, "properties": { "code": { "type": "string" }, "severity": { "type": "string", "enum": [ "error", "warning" ] }, "message": { "type": "string" }, "range": { "anyOf": [ { "type": "object", "required": [ "start", "end" ], "additionalProperties": false, "properties": { "start": { "type": "object", "required": [ "line", "character" ], "additionalProperties": false, "properties": { "line": { "type": "integer" }, "character": { "type": "integer" } } }, "end": { "type": "object", "required": [ "line", "character" ], "additionalProperties": false, "properties": { "line": { "type": "integer" }, "character": { "type": "integer" } } } } }, { "type": "null", "nullable": true } ] } } } } } }, "example": { "file": "policy.vd", "valid": true, "ruleCount": 1, "diagnostics": [] }}By default, the command renders human-readable records. --json writes one JSON result to stdout. Operational failures use status 1; JSON failures contain an error object with code and message. See shared output semantics.
Exit status
Section titled “Exit status”- 0: no errors and no disallowed warnings.
- 1: errors, or warnings without —allow-warnings; —skip-warnings omits warnings.
Argument, I/O, and other failures handled by the CLI runner use status 1.
Examples
Section titled “Examples”verdict validate policy.vd --jsonverdict validate policy.vd --allow-warnings