Comments that pointed at other YAML as `file.yaml:N` went stale on any edit above the cited line; three drift fixes had been merged by hand (REN-181). The cited block now carries `# anchor: <name>` and the comment cites `path.yaml#<name>`. - Sweep: all 32 line-number citations in YAML comments converted. Several were already stale at head and now point at the right block (see PR). Vendored files (Flux gotk-components, IMC CRD) get no anchor; those two citations name the object/schema path instead. - Guard: scripts/ci/yaml-citations.sh in ci-manifests-test.yml; fails on a line-number citation or a path#name whose file/anchor is gone. Self-test in ci-scripts-test.yml. - CONTRIBUTING.md: the convention in three lines. Comment-only under kubernetes/: every file parses to identical objects before and after, so Flux applies nothing and no ConfigMap data changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
612 B
612 B
Contributing
Citing other YAML from a comment
- Mark the block you cite with a comment line
# anchor: <name>(kebab-case, unique in that file). If the block is inside a|block scalar, put the marker just above the key, never inside the scalar. - Cite it as
path.yaml#<name>, with the path relative to the citing file's directory or to the repo root. Never citepath.yaml:<line>, because line numbers go stale on any edit above them. scripts/ci/yaml-citations.shenforces this inci-manifests-test.yml: it fails on line-number citations and on citations whose file or anchor does not exist.