Skip to main content

single-yaml-directive

Overview

This rule belongs to the yaml-semantic-validation ruleset and states that:

Only one %YAML directive must exist per YAML file. More than one %YAML directives are not allowed.

PropertyValue
EnabledYes
Maximum SeverityBlocking
MessageDuplicate %YAML directive found.
CodeYAMLSEMANTIC_V102
TypeValidation
Rule SystemSemantic
Broad CategoryDirectives
Tagsyaml data semantic preliminary checks validation yaml directive

Suggested Fixes

  • Remove the second %YAML directive. Only one %YAML directive allowed per document.

For More Information