no-unused-anchors
What it does
Section titled “What it does”Reports an anchor that no alias refers to. The fix removes the anchor and changes nothing about the data.
Why it matters
Section titled “Why it matters”An anchor that nobody uses is left from a removed alias and makes a reader look for the place that shares the node.
Configuration
Section titled “Configuration”github-actions: lint: rules: no-unused-anchors: warn # off (default), warn, erroryaml: lint: rules: no-unused-anchors: warn # off (default), warn, errorEnabled by the presets: github-actions/actionlint.
Suppress one line with sudsy-disable-next-line no-unused-anchors 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/unused-anchor |
partial | The shared YAML rule, enabled by the preset for workflows. |
| yamllint | anchors.forbid-unused-anchors |
full |