chore(deps): update dependency regal to v0.40.0 (main)#4832
Merged
elastic-renovate-prod[bot] merged 1 commit intomainfrom Apr 22, 2026
Merged
chore(deps): update dependency regal to v0.40.0 (main)#4832elastic-renovate-prod[bot] merged 1 commit intomainfrom
elastic-renovate-prod[bot] merged 1 commit intomainfrom
Conversation
Contributor
Merge Queue Status
This pull request spent 37 minutes 16 seconds in the queue, with no time running CI. Waiting for:
All conditions
ReasonPull request #4832 has been merged manually at eae4dce HintYou were too fast! |
74 tasks
74 tasks
74 tasks
74 tasks
74 tasks
74 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.38.1->0.40.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
StyraInc/regal (regal)
v0.40.0Today we celebrate Regal who turns v0.40.0 just in time for the GitHub download tracker to report 1 million total downloads. Quite the milestone! Thank you all for the encouragement, support and contributions during these past 3 years. Together we're redefining the policy development experience, and we have a lot more of that planned for the future. Stay tuned!
This release includes 2 new linter rules, and many new features and improvements to both the linter and language server.
Linter
New Rule:
invalid-regexpCategory: bugs
The new invalid-regexp rule scans regular expressions found in policies and reports invalid patterns that would otherwise fail at runtime.
Avoid
Prefer
New Rule:
superfluous-object-getCategory: idiomatic
The superfluous-object-get rule flags calls to
object.getwhere using the built-in function provides no benefit compared to using a reference directly, and without the call.Avoid
Prefer
More cases of superfluous
object.getwill be added to this rule as we encounter them.Improvements
naming-conventionrule now accepts a list of allowed names in addition to regex patternsnon-loop-expressionrule now identifies more types of expressions that could be moved out of iterationrelated_resourcesitem in their metadata pointing to the docs for the ruleregal new rulecommand now generates aRelated Resourcessection in the new rule's documentation template(thanks @mvanhorn!)
Bugs Fixed
non-loop-expressionrule--profileflag is used without--format json(thanks @mvanhorn!)Language Server
Evaluate and Debug Actions
Any
input.jsonorinput.yamlfile found in the workspace will be used forinputduring evaluation and debugging sessions, but this wasn't obvious without reading the docs. The Evaluate and Debug code lenses / commands will now present a dialog option asking to create aninput.jsonfile in the project workspace in case one isn't found. This file is populated with dummy JSON data based on references toinputfound in the policy, and should be edited by the user to provide more relevant data.Many thanks to @SeanLedford for this great work!
Hover Provider Improvements
The hover provider showing tooltips for built-in functions and keywords has been rewritten in Rego, and additionally saw a few improvements land as part of that process:
printfunction now shows up in hover results as wellInlay Hints Improvements
The inlay hint provider (that provides names of function arguments to be displayed at call sites) has also been rewritten in Rego, and the server now implements also the
inlayHint/resolvehandler, which improves performance by only calculating inlay hint details when the client requests them for display.Additionally, the inlay hint provider now properly takes the range of the active editor view into account, and will only spend resources calculating hints for code that the user can actually can see.
Semantic Tokens in Comprehensions and
everyExpressionsThe language server's semantic token provider (providing context-based syntax highlighting) now provides semantic tokens inside of comprehensions and
everyexpressions in addition to previously supported contexts. Additionally, most of the semantic token logic is now implemented entirely in Rego.Improved Language Server Initialization
This release contains a number of fixes and improvements related to the language server's initialization routine, which should now be both more robust and faster.
Bugs Fixed
Finally
Extra thanks goes out to @charlieegan3 this release, who worked tirelessly to fix some really complex race conditions and concurrency issues in the language server. A thankless job, but extremely important, and he pulled it off like a true Viking!
Changelog
691afe1: Replace some Styra references (#1904) (@anderseknert)975ae72: build(deps): bump github.com/go-git/go-git/v5 in the dependencies group (#1903) (@dependabot[bot])c85d88f: build(deps): bump go.opentelemetry.io/otel/sdk in /build/lsp (#1906) (@dependabot[bot])5ff449b: build(deps): bump the dependencies group with 3 updates (#1907) (@dependabot[bot])9900522: lsp: Wait for client to send initialized at boot (#1909) (@charlieegan3)d661b5a: build(deps): bump github/codeql-action in the dependencies group (#1912) (@dependabot[bot])fd85e2d: Allow naming-convention rule to take list of names (not only a pattern) (#1911) (@anderseknert)299d3fc: Semantic Token Support for Comprehensions and Constructs (#1883) (@SeanLedford)422a9ef: build(deps): bump github/codeql-action in the dependencies group (#1915) (@dependabot[bot])02a9dc8: Fail with error when --profile used without JSON format (#1918) (@mvanhorn)1716e13: lsp/webserver: Add links to the index page (#1914) (@charlieegan3)1ab360f: lsp/testing: Nested test implementation (#1913) (@charlieegan3)53e5bf2: build(deps): bump google.golang.org/grpc in /e2e/testbuild (#1916) (@dependabot[bot])45841bf: build(deps): bump smol-toml and markdownlint-cli in /build (#1919) (@dependabot[bot])371bf1f: build(deps): bump picomatch from 4.0.3 to 4.0.4 in /build (#1920) (@dependabot[bot])62852fc: build(deps): bump the dependencies group across 1 directory with 4 updates (#1921) (@dependabot[bot])d32408d: build(deps): bump github.com/go-git/go-git/v5 in /e2e/testbuild (#1922) (@dependabot[bot])8b9bcf0: build(deps): bump github.com/go-git/go-git/v5 from 5.17.0 to 5.17.1 (#1923) (@dependabot[bot])f2251f2: [create-pull-request] automated change (#1908) (@github-actions[bot])820d3f0: OPA v1.15.1 (#1925) (@anderseknert)a155b62: Add popup prompt for creating input.json if it doesnt exist when Evaluate is run (#1929) (@SeanLedford)27067af: build(deps): bump the dependencies group with 2 updates (#1931) (@dependabot[bot])2179ae4: Fix non-loop-expression false positives (#1930) (@anderseknert)33282ba: Rule: superflous-object-get (#1932) (@anderseknert)6fd115a: Include rule docs links in metadata (#1935) (@anderseknert)6a364fb: Fix aggregate test loop initialization (#1936) (@charlieegan3)61ab730: Rule: invalid-regexp (#1937) (@anderseknert)752ca7e: Cover morenon-loop-expressions (#1938) (@anderseknert)cb9a9c8: Add convenience functions for working with lines and uints (#1944) (@anderseknert)85171b8: build(deps): bump go.opentelemetry.io/otel/sdk in /e2e/testbuild (#1942) (@dependabot[bot])7fd6d66: [feature] Create input.json Skeleton if User Would Like When One Doesn't Exist (#1934) (@SeanLedford)e4e326b: OPA v1.15.2 (#1945) (@anderseknert)e8f1469: build(deps): bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp (#1941) (@dependabot[bot])7a1235c: Fix potential nil deref in language server (#1947) (@anderseknert)d6d2bf0: Fix index out of bounds in parital inlay hint (#1948) (@anderseknert)0a0f1f8: build(deps): bump the dependencies group with 2 updates (#1946) (@dependabot[bot])d0e99b5: Rewrite hover provider in Rego (#1951) (@anderseknert)cc35d48: Fix possible nil deref in ogre (#1954) (@anderseknert)44ceabe: Rewrite inlay hint provider in Rego (#1953) (@anderseknert)5c62c72: testing: Improve lsp shutdown logic & address test race conditions (#1943) (@charlieegan3)12cc776: Semantic package tokens in Rego (#1956) (@anderseknert)b4ccafc: feat(new): add Related Resources source link to builtin rule doc template (#1957) (@mvanhorn)543d3fa: linter/lsp: Tidy use of aggregates and store in ls (#1962) (@charlieegan3)1442904: build(deps): bump github.com/go-git/go-git/v5 from 5.17.2 to 5.18.0 (#1958) (@dependabot[bot])293cd7f: build(deps): bump github.com/go-git/go-git/v5 in /e2e/testbuild (#1959) (@dependabot[bot])344a389: build(deps): bump the dependencies group with 3 updates (#1963) (@dependabot[bot])784fa86: Semantic import tokens Rego rewrite (#1960) (@anderseknert)0a00617: Refactor: Sending Variable Semantic Tokens Data from Rego (#1961) (@SeanLedford)9016d3d: Minor fixes (#1965) (@anderseknert)0ddd70f: docs: Update setup-regal in docs (#1964) (@charlieegan3)v0.39.0We'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 - "* 1 * * 1-5" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ 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.
This PR has been generated by Renovate Bot.