Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityBlocking
MessageUnexpected version number found for YAML directive.
CodeYAMLSYNTAX_V151
TypeValidation
Rule SystemSyntax
Broad CategoryDirectives
Tagsyaml 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

For More Information