no-merge-keys
What it does
Section titled “What it does”Reports the merge key <<.
Why it matters
Section titled “Why it matters”The merge key is from YAML 1.1; YAML 1.2 dropped it from the specification. Parsers that follow 1.2 strictly or do not implement it read << as an ordinary key, so the merged values are missing.
To fix, write the merged entries out or let the tool that reads the file expand the anchors.
Example
Section titled “Example”base: &base a: 1b: <<: *base c: 2d: "<<"Configuration
Section titled “Configuration”github-actions: lint: rules: no-merge-keys: warn # off (default), warn, erroryaml: lint: rules: no-merge-keys: warn # off (default), warn, errorEnabled by the presets: github-actions/actionlint.
Suppress one line with sudsy-disable-next-line no-merge-keys in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.
| Tool | Rule | Match | What differs |
|---|---|---|---|
| actionlint | syntax-check/merge-key |
partial | The shared reference rule, enabled by the preset for workflows. |