The new optional equals-over-count rule suggests using direct equality comparisons rather than count when checking collection membership or emptiness (#1878). This is a micro-optimization and not a general recommendation. Must be manually enabled.
Performance
This release brings an approximate 25% reduction in linting time through aggregate remodeling and Rego prepare stage optimizations (#1838). Additional performance work includes Rego refactoring (#1857, #1884), AST transform improvements (#1892), and various micro-optimizations (#1866, #1879).
Language Server Improvements
The language server now includes a semantic token framework for improved syntax highlighting (#1845, #1865, #1870),
code actions for the constant-condition and redundant-existence-check fixers (#1830).
and an opaTestProvider feature for test discovery (#1888, #1889, #1898),
Completion performance is improved with a completionItem/resolve handler (#1831),
and server capabilities are now properly exposed and consistent with the clients (#1867, #1880).
Note: Semantic token support is feature flagged and will be available in the next release.
Compiler Explorer
Regal now supports the VSCode-based OPA Explorer extension, providing a rich GUI to compare compiler stages directly in VS Code (#1862) - thanks @srenatus! A new "Format stages" option has also been added to the compiler explorer (#1854) - thanks @johanfylling!
This PR contains the following updates:
| Package | Update | Change |
|---|---|---|
| [open-policy-agent/regal](https://github.com/open-policy-agent/regal) | minor | `0.38.1` -> `0.39.0` |
---
### Release Notes
<details>
<summary>open-policy-agent/regal (open-policy-agent/regal)</summary>
### [`v0.39.0`](https://github.com/open-policy-agent/regal/releases/tag/v0.39.0)
[Compare Source](https://github.com/open-policy-agent/regal/compare/v0.38.1...v0.39.0)
We're happy to announce Regal v0.39.0, featuring 3 new linter rules, many language server improvements, and much faster linting!
#### New Rule: `use-array-flatten`
**Category:** idiomatic
The [use-array-flatten](https://www.openpolicyagent.org/projects/regal/rules/idiomatic/use-array-flatten) rule recommends using `array.flatten` instead of nested `array.concat`enation ([#​1873](https://github.com/open-policy-agent/regal/issues/1873)).
**Avoid**
```rego
package policy
flat1 := array.concat(arr1, array.concat(arr2, arr3))
flat2 := array.concat(arr1, array.concat(arr2, array.concat(arr3, arr4)))
```
**Prefer**
```rego
package policy
flat1 := array.flatten([arr1, arr2, arr3])
flat2 := array.flatten([arr1, arr2, arr3, arr4])
```
#### New Rule: `use-object-union-n`
**Category:** idiomatic
The [use-object-union-n](https://www.openpolicyagent.org/projects/regal/rules/idiomatic/use-object-union-n) rule recommends using `object.union_n` over nested calls to `object.union` ([#​1873](https://github.com/open-policy-agent/regal/issues/1873)).
**Avoid**
```rego
package policy
obj := object.union(obj1, object.union(obj2, obj3))
```
**Prefer**
```rego
package policy
obj := object.union_n([obj1, obj2, obj3])
```
#### New Rule: `equals-over-count`
**Category:** performance
The new optional [equals-over-count](https://www.openpolicyagent.org/projects/regal/rules/performance/equals-over-count) rule suggests using direct equality comparisons rather than `count` when checking collection membership or emptiness ([#​1878](https://github.com/open-policy-agent/regal/issues/1878)). This is a micro-optimization and not a general recommendation. Must be manually enabled.
#### Performance
This release brings an approximate 25% reduction in linting time through aggregate remodeling and Rego prepare stage optimizations ([#​1838](https://github.com/open-policy-agent/regal/issues/1838)). Additional performance work includes Rego refactoring ([#​1857](https://github.com/open-policy-agent/regal/issues/1857), [#​1884](https://github.com/open-policy-agent/regal/issues/1884)), AST transform improvements ([#​1892](https://github.com/open-policy-agent/regal/issues/1892)), and various micro-optimizations ([#​1866](https://github.com/open-policy-agent/regal/issues/1866), [#​1879](https://github.com/open-policy-agent/regal/issues/1879)).
#### Language Server Improvements
The language server now includes a semantic token framework for improved syntax highlighting ([#​1845](https://github.com/open-policy-agent/regal/issues/1845), [#​1865](https://github.com/open-policy-agent/regal/issues/1865), [#​1870](https://github.com/open-policy-agent/regal/issues/1870)),
code actions for the `constant-condition` and `redundant-existence-check` fixers ([#​1830](https://github.com/open-policy-agent/regal/issues/1830)).
and an `opaTestProvider` feature for test discovery ([#​1888](https://github.com/open-policy-agent/regal/issues/1888), [#​1889](https://github.com/open-policy-agent/regal/issues/1889), [#​1898](https://github.com/open-policy-agent/regal/issues/1898)),
Completion performance is improved with a `completionItem/resolve` handler ([#​1831](https://github.com/open-policy-agent/regal/issues/1831)),
and server capabilities are now properly exposed and consistent with the clients ([#​1867](https://github.com/open-policy-agent/regal/issues/1867), [#​1880](https://github.com/open-policy-agent/regal/issues/1880)).
**Note:** Semantic token support is feature flagged and will be available in the next release.
#### Compiler Explorer
Regal now supports the VSCode-based OPA Explorer extension, providing a rich GUI to compare compiler stages directly in VS Code ([#​1862](https://github.com/open-policy-agent/regal/issues/1862)) - thanks [@​srenatus](https://github.com/srenatus)! A new "Format stages" option has also been added to the compiler explorer ([#​1854](https://github.com/open-policy-agent/regal/issues/1854)) - thanks [@​johanfylling](https://github.com/johanfylling)!
#### Experimental: rq Engine Support
Initial support for the rq engine has been added ([#​1872](https://github.com/open-policy-agent/regal/issues/1872)) - thanks [@​charlesdaniels](https://github.com/charlesdaniels)!
#### Various Improvements
- Improved `redundant-existence-check` rule ([#​1897](https://github.com/open-policy-agent/regal/issues/1897), fixes [#​1805](https://github.com/open-policy-agent/regal/issues/1805))
- Disabled `zero-arity-function` rule as `opa-fmt` now covers that ([#​1885](https://github.com/open-policy-agent/regal/issues/1885))
#### Bug Fixes
- Fix nil dereference on compiler errors in explorer ([#​1837](https://github.com/open-policy-agent/regal/issues/1837))
- Fix broken links to fixer page ([#​1852](https://github.com/open-policy-agent/regal/issues/1852))
- Fix false positive in `use-some-for-output-vars` ([#​1886](https://github.com/open-policy-agent/regal/issues/1886))
- Fix broken `input.json` completion provider ([#​1891](https://github.com/open-policy-agent/regal/issues/1891))
#### Dependency Updates
Regal has been upgraded to use OPA v1.14.0 and Go 1.26.
#### Documentation
- Added mise as an alternative installation method ([#​1849](https://github.com/open-policy-agent/regal/issues/1849)) - thanks [@​jylenhof](https://github.com/jylenhof)!
- Updated installation documentation ([#​1861](https://github.com/open-policy-agent/regal/issues/1861))
- Updated note about eval and debug roots ([#​1894](https://github.com/open-policy-agent/regal/issues/1894))
- Show release badge when using pre-release versions ([#​1899](https://github.com/open-policy-agent/regal/issues/1899))
#### New Contributors
- [@​jylenhof](https://github.com/jylenhof) made their first contribution in [#​1849](https://github.com/open-policy-agent/regal/pull/1849)
- [@​charlesdaniels](https://github.com/charlesdaniels) made their first contribution in [#​1872](https://github.com/open-policy-agent/regal/pull/1872)
</details>
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNDAuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE0MC4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
CSRBot
changed title from chore(deps): update dependency open-policy-agent/regal to v0.39.0 to chore(deps): update dependency open-policy-agent/regal to v0.39.0 - autoclosed2026-02-27 00:10:00 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
0.38.1->0.39.0Release Notes
open-policy-agent/regal (open-policy-agent/regal)
v0.39.0Compare Source
We're happy to announce Regal v0.39.0, featuring 3 new linter rules, many language server improvements, and much faster linting!
New Rule:
use-array-flattenCategory: idiomatic
The use-array-flatten rule recommends using
array.flatteninstead of nestedarray.concatenation (#1873).Avoid
Prefer
New Rule:
use-object-union-nCategory: idiomatic
The use-object-union-n rule recommends using
object.union_nover nested calls toobject.union(#1873).Avoid
Prefer
New Rule:
equals-over-countCategory: performance
The new optional equals-over-count rule suggests using direct equality comparisons rather than
countwhen checking collection membership or emptiness (#1878). This is a micro-optimization and not a general recommendation. Must be manually enabled.Performance
This release brings an approximate 25% reduction in linting time through aggregate remodeling and Rego prepare stage optimizations (#1838). Additional performance work includes Rego refactoring (#1857, #1884), AST transform improvements (#1892), and various micro-optimizations (#1866, #1879).
Language Server Improvements
The language server now includes a semantic token framework for improved syntax highlighting (#1845, #1865, #1870),
code actions for the
constant-conditionandredundant-existence-checkfixers (#1830).and an
opaTestProviderfeature for test discovery (#1888, #1889, #1898),Completion performance is improved with a
completionItem/resolvehandler (#1831),and server capabilities are now properly exposed and consistent with the clients (#1867, #1880).
Note: Semantic token support is feature flagged and will be available in the next release.
Compiler Explorer
Regal now supports the VSCode-based OPA Explorer extension, providing a rich GUI to compare compiler stages directly in VS Code (#1862) - thanks @srenatus! A new "Format stages" option has also been added to the compiler explorer (#1854) - thanks @johanfylling!
Experimental: rq Engine Support
Initial support for the rq engine has been added (#1872) - thanks @charlesdaniels!
Various Improvements
redundant-existence-checkrule (#1897, fixes #1805)zero-arity-functionrule asopa-fmtnow covers that (#1885)Bug Fixes
use-some-for-output-vars(#1886)input.jsoncompletion provider (#1891)Dependency Updates
Regal has been upgraded to use OPA v1.14.0 and Go 1.26.
Documentation
New Contributors
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.
chore(deps): update dependency open-policy-agent/regal to v0.39.0to chore(deps): update dependency open-policy-agent/regal to v0.39.0 - autoclosedPull request closed