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.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Blocking |
Message | Mapping key could not be parsed. |
Code | YAMLSYNTAX_V003 |
Type | Validation |
Rule System | Syntax |
Broad Category | Mapping Values |
Tags | yaml 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.