-
Notifications
You must be signed in to change notification settings - Fork 39
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
Comments
Hi Odin! Ah, yes... that one is registered as mandatory: https://github.com/StyraInc/regal/blob/main/cmd/fix.go#L274 Either way, if we intend to keep it this way we should document that. Are there any reasons you can't use |
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 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 |
That makes perfect sense! I'll consult with @charlieegan3 on whether to change the defaults or the docs. Will let you know! |
Hi @Od1nB, much has been adjusted in the fix functionality since this was first reported. My understanding is that this will no longer happen. …/regal/temp fixer-ignore ➜ cat wow/foo.rego
1 │ package wow
2 │
3 │ allow := true # note, not formatted, extra spaces
…/regal/temp fixer-ignore ➜ ./regal_Darwin_arm64 version
Version: 0.30.2
Go Version: go1.23.3
Platform: darwin/arm64
Commit: 2c6ee8e23a1d1625780c4a057d60d954ca9fea7f
Timestamp: 2025-01-16T17:33:07Z
Hostname: github.actions.local
…/regal/temp fixer-ignore ➜ ./regal_Darwin_arm64 fix --disable-all wow/foo.rego --force
No fixes applied.
…/regal/temp fixer-ignore ➜ cat wow/foo.rego
1 │ package wow
2 │
3 │ allow := true # note, still not formatted.
Please don't take my word for it, if you see something else in the latest release, please let me know! Aside, see https://docs.styra.com/regal#configuring-rego-version if still working on v0 Rego. Closing for now, but we can re-open if we find another case. |
when running
regal fix [[path] --disable-all/-D
orregal fix [path] --disable [rule]
the use-rego-v1 rule will always be ran even if you try to disable itThe text was updated successfully, but these errors were encountered: