valid-yaml-directive-version-number
Overview
This rule belongs to the yaml-syntax-validation ruleset and states that:
The %YAML directive specifies the version of YAML the document conforms to. Documents explicitly specifying a YAML directive must only use a valid YAML version number after the directive name e.g. %YAML 1.2.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Blocking |
| Message | Unexpected version number found for YAML directive. |
| Code | YAMLSYNTAX_V151 |
| Type | Validation |
| Rule System | Syntax |
| Broad Category | Directives |
| Tags | yaml data syntax preliminary checks validation yaml directive version number version |
Suggested Fixes
- Please specify a valid version number after the %YAML directive separated with a space e.g. %YAML 1.1