You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing Regal on some policy libraries found online, there are a lot of violations reported for style-related rules, like preferring := over = for top-level assignment. While we should be adamant about good style, there's also a clear risk that a user seeing hundreds of such violations either disables those rules, or worse — misses more severe violations as they drown in the amount of warnings reported.
For simple style rules like the one above, it would be interesting to explore if we could provide a remediation option, were we rewrote "bad" constructs to better ones without the user having to do the heavy lifting. Something similar to opa fmt, but limited to linter rules.
The text was updated successfully, but these errors were encountered:
Two linter rules now have remediations available via the Regal language server: opa-fmt and use-rego-v1. More will likely follow soon. It would be good if all these remediations were made available via the CLI too as to avoid having drift in features supported by the CLI vs LSP.
Testing Regal on some policy libraries found online, there are a lot of violations reported for style-related rules, like preferring
:=
over=
for top-level assignment. While we should be adamant about good style, there's also a clear risk that a user seeing hundreds of such violations either disables those rules, or worse — misses more severe violations as they drown in the amount of warnings reported.For simple style rules like the one above, it would be interesting to explore if we could provide a remediation option, were we rewrote "bad" constructs to better ones without the user having to do the heavy lifting. Something similar to
opa fmt
, but limited to linter rules.The text was updated successfully, but these errors were encountered: