Skip to main content

no-reserved-keywords-in-unquoted-mapping-key

Overview

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

The key content of the key-value pair (or mapping) must not use null unless it is intended to be a property name in which case it must be enclosed in quotes. Similarly, use of any other YAML reserved keywords must be avoided as key names unless they be enclosed in quotes.

PropertyValue
EnabledYes
Maximum SeverityBlocking
MessageMapping key could not be parsed.
CodeYAMLSYNTAX_V003
TypeValidation
Rule SystemSyntax
Broad CategoryMapping Values
Tagsyaml data syntax preliminary checks validation yaml null mapping key maps objects reserved keyword

Suggested Fixes

  • If there is a property with key equal to null, enclose it in quotes.

For More Information