Skip to content
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

Bug - default rules must use = operator (not := operator) #60

Closed
RmStorm opened this issue Feb 10, 2023 · 2 comments
Closed

Bug - default rules must use = operator (not := operator) #60

RmStorm opened this issue Feb 10, 2023 · 2 comments

Comments

@RmStorm
Copy link

RmStorm commented Feb 10, 2023

Hey! Thanks for putting in the effort to make a language server for rego! Really cool! this issue in the opa repo didn't have me hopeful 😅 open-policy-agent/opa#4041 haha.

I installed regols and am using it but I think I ran into a bug. I have a line in one of my policies like this:

default allow := false

But the language server marks it as a diagnostic error with the message:
default rules must use = operator (not := operator)

However, in the example here the OPA people clearly use a := to define a default variable. Can this be fixed? Or am I misunderstanding something? Also happy to submit a PR if you point me in the right direction! I've never done any work on an LSP before so I'm kinda out of my depth.

@kitagry
Copy link
Owner

kitagry commented Feb 10, 2023

@RmStorm Thank you for the nice issue! Could you try https://github.com/kitagry/regols/releases/tag/v0.2.1?

@RmStorm
Copy link
Author

RmStorm commented Feb 10, 2023

Wow that was incredibly quick! It's fixed 🙏 Thanks a lot 😄

@RmStorm RmStorm closed this as completed Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants