Skip to content

Conversation

@elastic-renovate-prod
Copy link
Contributor

This PR contains the following updates:

Package Update Change
regal minor 0.36.1 -> 0.38.1

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

StyraInc/regal (regal)

v0.38.1

This patch release fixes several bugs including some found in the recent v0.38.0 release, as well some other improvements.

Bug Fixes

Improvements

  • Code action for prefer-equals-comparison fixer now available in the language server (#​1810)
  • New option for prefer-value-in-head rule to count interpolated strings as scalars (#​1817)
  • Minor performance improvement for any_set_item, used for selecting items from sets (#​1815)

Changelog

v0.38.0

Happy New Year from the Regal maintainers!

Feature: String Interpolation Support

v0.38.0 of your favorite Rego linter, debugger and language server brings full support for OPA's new string interpolation feature. This means not only that Regal lints code found inside interpolated strings, but that you'll have access to all your favorite language server features within them too — like code completions, tooltips on hover, or document highlighting. You can even use the debugger to step through interpolated expressions! If you haven't yet tried it out, grab OPA v1.12.2, Regal v0.38.0 and enjoy an absolutely awesome addition to the Rego language!

In addition to this, we have a number of fun new features and performance improvements.

New Rule: disallow-rego-v1

Category: custom

This optional new rule flags the use of import rego.v1 in Rego policies (#​1778). Since OPA v1.0 (December 2024), this import is a no-op and no longer needed. The rule helps users maintain clean code by preventing this outdated import from appearing in new policies. Teams standardizing on OPA 1.0+ can enable this rule to enforce modern Rego standards.

package example

import rego.v1 # <-- Happy 2026! Time to stop doing this!

Authored by @​SeanLedford.

New Fixers

@​SeanLedford has also done some great work to help expand Regal's auto-fixing capabilities by having regal fixers added for three more rules.

See (#​1790) and (#​1794) for more details.

Performance

The fixer saw a 12% performance improvement by reusing the linter, reducing allocations from 2.3M to 2.0M operations (#​1783). Additional optimizations include:

  • faster file filtering by avoiding recompiled ignore patterns (#​1758),
  • better built-in function handling by registering Regal's functions globally only once (#​1788),
  • and more efficient AST location serialization (#​1758)

To track ongoing performance work, a new post-merge benchmark-recording workflow was added (#​1793).

LSP: New Ignore Code Action

The language server now supports a code action to quickly add regal ignore configuration for specific rules directly from the editor (#​1777).

Changelog

v0.37.0

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-comparison

The 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

input.request.method = "GET"

Prefer

input.request.method == "GET"

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.

documenthighlighting

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

selectionranges

Improvements

  • The pointless-reassignment rule would previously only flag reassignment at the top level of a rule body. Now it flags pointless reassignments also in nested bodies, like comprehensions, every statements, 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

Dependency Updates:

Go modules:

  • github.com/open-policy-agent/opa: v1.8.0v1.10.1
  • github.com/arl/statsviz: v0.7.1v0.7.2
  • github.com/go-git/go-git/v5: v5.16.2v5.16.3
  • github.com/olekukonko/tablewriter: v0.0.5v1.1.0
  • github.com/spf13/cobra: v1.9.1v1.10.1
  • github.com/spf13/pflag: v1.0.7v1.0.10
  • Removed: github.com/coreos/go-semver: v0.3.1

GitHub Actions:

  • open-policy-agent/setup-opa: v2.2.0v2.3.0
  • actions/cache: v4.2.4v4.3.0
  • actions/upload-artifact: v4.6.2v5.0.0
  • golangci/golangci-lint-action: v2.4.0v2.5.0
  • actions/setup-go: v5.5.0v6.0.0

Support

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!

Changelog


Configuration

📅 Schedule: Branch creation - "after 1am on monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@elastic-renovate-prod elastic-renovate-prod bot requested a review from a team as a code owner February 2, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants