Regal v0.37.0 #725
anderseknert
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Regal v0.37.0
This release features a new linter rule, several new language server features, and many improvements and fixes. The two major OPA versions bumped since the last release additionally contains several performance improvements that were contributed as part of developing Regal!
New Rule:
prefer-equals-comparisonThe prefer-equals-comparison linter rule recommends using the
==operator for equality comparison over the unification operator=. The rule helps improve code clarity by using operators for their intended purposes::=for assignment,==for equality comparison, and=for unification. The linter identifies when=is used for comparison by checking if both sides of the operator are "unassignable".Avoid
Prefer
There are some certainly valid use cases for the unification operator! But simple equality comparison is not one. For more information, see the documentation for the rule. As an amusing aside, this fixes one of the first issues created in the project!
Language server: Document highlighting to help show where function args are referenced
Document highlighting is one of the more subtle features of the LSP specification, but a really helpful one when implemented well. The experimental first implementation that shipped with Regal v0.36.0 is no longer experimental, and has also been extended to highlight usage of function argument variables inside of a function head or body.
Language server: Selection ranges
Selection ranges provide smart selection of code that can expand and shrink based on knowledge of the code rather than simple text properties, like hyphens or whitespace. This makes moving code around extremely fast, and without leaving the keyboard. Consult the language server docs for how to enable this in your editor
Improvements
everystatements, and so on.Windows compatibility improvements
In this release we have fixed various Windows bugs (Language Server Init, Goto Definition, Error Popups) in #1740, #1737, #1736, following #1633, and #1642 last release. Reported and verified by geirs73.
These fixes have also made it possible to run our test suites on Windows runners to catch issues sooner in future. A huge thanks to @charlieegan3 for his tireless work on this!
Bugs fixed
rule[input[i]].allow if ....notcheck made an existence check necessary, reported by @gusegaInitOptionsis never nil and don't cause issues with clients that don't provide thoseDependency Updates:
Go modules:
github.com/open-policy-agent/opa:v1.8.0→v1.10.1github.com/arl/statsviz:v0.7.1→v0.7.2github.com/go-git/go-git/v5:v5.16.2→v5.16.3github.com/olekukonko/tablewriter:v0.0.5→v1.1.0github.com/spf13/cobra:v1.9.1→v1.10.1github.com/spf13/pflag:v1.0.7→v1.0.10github.com/coreos/go-semver:v0.3.1GitHub Actions:
open-policy-agent/setup-opa:v2.2.0→v2.3.0actions/cache:v4.2.4→v4.3.0actions/upload-artifact:v4.6.2→v5.0.0golangci/golangci-lint-action:v2.4.0→v2.5.0actions/setup-go:v5.5.0→v6.0.0Support
If you encounter any issues with this release, please either file an issue, or let us know in the #opa-regal channel in the OPA Slack!
Full release notes and downloads here.
Beta Was this translation helpful? Give feedback.
All reactions