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.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Blocking |
Message | Duplicate %YAML directive found. |
Code | YAMLSEMANTIC_V102 |
Type | Validation |
Rule System | Semantic |
Broad Category | Directives |
Tags | yaml data semantic preliminary checks validation yaml directive |
Suggested Fixes
- Remove the second %YAML directive. Only one %YAML directive allowed per document.