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: --disable doesnt work for use-rego-v1 #1149

Open
Od1nB opened this issue Sep 27, 2024 · 3 comments
Open

Bug: --disable doesnt work for use-rego-v1 #1149

Od1nB opened this issue Sep 27, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Od1nB
Copy link

Od1nB commented Sep 27, 2024

when running regal fix [[path] --disable-all/-D or regal fix [path] --disable [rule] the use-rego-v1 rule will always be ran even if you try to disable it

@anderseknert
Copy link
Member

anderseknert commented Sep 27, 2024

Hi Odin!

Ah, yes... that one is registered as mandatory: https://github.com/StyraInc/regal/blob/main/cmd/fix.go#L274
Although I don't remember now why we made it so 😅 But it was most likely for good reasons. @charlieegan3 do you remember?

Either way, if we intend to keep it this way we should document that. Are there any reasons you can't use import rego.v1?
OPA 1.0 is like a month or so away, so you'll want to prepare for that now :)

@anderseknert anderseknert added the bug Something isn't working label Sep 27, 2024
@Od1nB
Copy link
Author

Od1nB commented Sep 30, 2024

Hey Anders!

Aah yeah it is, didn't look at the code to verify. It would be nice if it was shown in the docs or the regal fix --help prompt that rego-v1 will be applied as default, and with no option to disable.

There is no reason we cant use it, but I get some pushback if I change other application teams rego policies, but with V1 looming over us I can emphasise the importance.

Came across this while enabling the 0.27 rules, but anyhow I don't wanna do both rego-v1 and the directory-package-mismatch rules on our repo at the same time. But I'll just do v1 first, and then directory structure afterwards in a separate pull request.

@anderseknert
Copy link
Member

That makes perfect sense! I'll consult with @charlieegan3 on whether to change the defaults or the docs. Will let you know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants