-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
Hi, I'm not sure if this has been addressed before or I'm using the tool wrong. But I just found this trying it on our chart which I think might be a bug.
In a block, if commented out fields come before uncommented fields, and --uncomment is passed, I get this error parsing my values.yaml:
ERRO[2026-02-05T14:08:10-05:00] Found 1 errors while processing the chart foo (Chart.yaml)
ERRO[2026-02-05T14:08:10-05:00] yaml: line 4: did not find expected key
ERRO[2026-02-05T14:08:10-05:00] Execution error: some errors were found
For example,
# @schema
# description: |-
# This is a test schema.
# @schema
myobject:
# @schema
# description: |-
# This is a test commented field.
# @schema
#baz: qux
# @schema
# description: |-
# This is a test field.
# @schema
foo: bar
but this works:
# @schema
# description: |-
# This is a test schema.
# @schema
myobject:
# @schema
# description: |-
# This is a test field.
# @schema
foo: bar
# @schema
# description: |-
# This is a test commented field.
# @schema
#baz: qux
I haven't dug into the code, but to try to point to the issue here's what an AI agent suggested (grain of salt I know):
When inCode = true (parsing a block of commented YAML), and it encounters an uncommented line, that line gets added to the buffer instead of the result. The buffer is only flushed on empty lines.
Any help or suggestions would be welcome thanks for making this project!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels