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

Remediation #92

Closed
anderseknert opened this issue Apr 13, 2023 · 1 comment · Fixed by #653
Closed

Remediation #92

anderseknert opened this issue Apr 13, 2023 · 1 comment · Fixed by #653
Assignees
Labels
enhancement New feature or request

Comments

@anderseknert
Copy link
Member

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.

@anderseknert anderseknert added the enhancement New feature or request label Apr 13, 2023
@anderseknert anderseknert moved this to TODO in Regal Oct 11, 2023
@anderseknert
Copy link
Member Author

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.

@anderseknert anderseknert moved this from TODO to Planned in Regal Apr 15, 2024
@anderseknert anderseknert moved this from Planned to In Progress in Regal Apr 15, 2024
@anderseknert anderseknert linked a pull request Apr 17, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from In Progress to Done in Regal Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants