-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OPA build
/fmt
panics on second line comment when using |
#5798
Labels
Comments
rumenvasilev
added a commit
to rumenvasilev/opa
that referenced
this issue
Mar 30, 2023
Trolloldem
added a commit
to Trolloldem/opa
that referenced
this issue
May 30, 2023
Priot to this change, the `fmt` command panicked when rego files processed contained a comprehension written on multiple lines with comments in these lines. An example of such comprehension is presented in open-policy-agent#5798. After this change, comprehensions on multiple lines are not moved in a single line, in order to correcly handle comments, similarly to what has been already done in open-policy-agent#3864. Fixes: open-policy-agent#5798 Signed-off-by: Gianluca Oldani <oldanigianluca@gmail.com>
ashutosh-narkar
pushed a commit
to ashutosh-narkar/opa
that referenced
this issue
Jun 5, 2023
Priot to this change, the `fmt` command panicked when rego files processed contained a comprehension written on multiple lines with comments in these lines. An example of such comprehension is presented in open-policy-agent#5798. After this change, comprehensions on multiple lines are not moved in a single line, in order to correcly handle comments, similarly to what has been already done in open-policy-agent#3864. Fixes: open-policy-agent#5798 Signed-off-by: Gianluca Oldani <oldanigianluca@gmail.com> (cherry picked from commit 917dfc4)
ashutosh-narkar
pushed a commit
that referenced
this issue
Jun 6, 2023
Priot to this change, the `fmt` command panicked when rego files processed contained a comprehension written on multiple lines with comments in these lines. An example of such comprehension is presented in #5798. After this change, comprehensions on multiple lines are not moved in a single line, in order to correcly handle comments, similarly to what has been already done in #3864. Fixes: #5798 Signed-off-by: Gianluca Oldani <oldanigianluca@gmail.com> (cherry picked from commit 917dfc4)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Short description
OPA build
/fmt
panics on second line comment when using|
Expected behavior
This should work correctly, when runnig
opa build
oropa fmt
:PS: Error
undefined function f
is expected when compiled and run. Code is an example for the bug in fmtActual Behavior
opa fmt
returns a panic:Steps To Reproduce
Save the above code to
test.rego
run:
opa fmt test.rego
Additional context
OPA Version: 0.50.0
Related issue:
#3836
The text was updated successfully, but these errors were encountered: