fix(review): address feedback from reviews 2788, 2789, 2791

- Move nodeCount increment after cycle detection to avoid over-counting
  cyclic references (sonnet #2)
- Use underscores in test case names used as filenames (sonnet #3)
- Fix function comment: 'prevent silent data loss' → 'prevent confusing
  behavior where additional documents are silently ignored' (sonnet #4)
- Mark design doc pseudocode as historical since implementation uses
  goccy/go-yaml ast.Node, not gopkg.in/yaml.v3 yaml.Node (sonnet #5)
This commit is contained in:
claw
2026-05-12 14:13:59 -07:00
parent 9b1e93bfde
commit 3a1e5e443e
3 changed files with 17 additions and 10 deletions
+3 -3
View File
@@ -491,9 +491,9 @@ func TestYAMLEmptyFileRejection(t *testing.T) {
name string
content string
}{
{"completely empty", ""},
{"whitespace only", " \n\n "},
{"comment only", "# just a comment\n"},
{"completely_empty", ""},
{"whitespace_only", " \n\n "},
{"comment_only", "# just a comment\n"},
}
for _, tc := range tests {