Open msorens opened 4 months ago
@johanfylling is this expected behavior that needs a doc update or a bug?
I believe this is a matter of the documentation needing further clarification.
If a user wants to have comments inside the METADATA
yaml, they can inline yaml-style comments, e.g.:
# METADATA
# title: foo
# # This is a comment
# description: bar
This might need explicit documentation too 🤔 .
Yeah would be good to document the expected behavior here.
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. Although currently inactive, the issue could still be considered and actively worked on in the future. More details about the use-case this issue attempts to address, the value provided by completing it or possible solutions to resolve it would help to prioritize the issue.
Short description
With opa 0.64.1, the metadata is not being processed per the spec; so either opa is wrong or the spec is wrong on this. Regarding metadata annotations the spec says:
Steps To Reproduce
Consider this rego file (note the
description
line comment does NOT start in column 1):Run
opa inspect -a .
on that directory.Expected behavior
It should recognize both the
title
andcustom
properties.Actual behavior
opa recognizes only the
title
property.Additional context
It is acting as though the “comment block” should stop at the first line that is not in column 1. That is incorrect because the spec goes on to say that there is only one way to end a comment block: