Skip to main content

resolvable-node-anchor

Overview

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

A node can be anchored using & followed by an anchor name. This anchored node can then be referenced by an alias node using * followed by the anchor name. The anchor name used by the alias node must be valid and an anchored node of that name must exist.

PropertyValue
EnabledYes
Maximum SeverityBlocking
MessageReferenced anchor node could not be found.
CodeYAMLSYNTAX_V175
TypeValidation
Rule SystemSyntax
Broad CategoryAnchors
Tagsyaml data syntax preliminary checks validation yaml anchor node

Suggested Fixes

  • The alias anchor beginning with '*' requires a corresponding anchor defined somewhere in the file with the same name and a starting '&'
  • If the alias anchor is not intended to be used as an anchor remove starting '&'/'*' or escape the property value using quotes.
  • Ensure the anchor defined has the same name as the one being referenced here.

For More Information