Skip to main content

required-directive-name

Overview

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

Directives are instructions to the YAML processor. They are identified by their name which is required and cannot be empty or null.

PropertyValue
EnabledYes
Maximum SeverityBlocking
MessageDirective name is missing.
CodeYAMLSYNTAX_V150
TypeValidation
Rule SystemSyntax
Broad CategoryDirectives
Tagsyaml data syntax preliminary checks validation yaml name directive

Suggested Fixes

  • % is used for declaring directives in YAML. If you don't intend to use any directives, remove the trailing %.
  • Valid directives include %YAML, %TAG, etc.

For More Information