File regal.changes of Package regal
-------------------------------------------------------------------
Sun Sep 14 12:09:36 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- Update to version 0.36.1 (0.36.0 was not released):
This is Regal v0.36! The first Regal release since becoming a
part of the OPA project last month. This release mostly delivers
a number of new language server features as well as wider
improvements under the hood and to the developer experience.
* A note about Regal's documentation
Our documentation is now displayed as part of the main OPA
website!
https://www.openpolicyagent.org/projects/regal
From this release, links generated from Regal in output to
rules will point to this location. You might find links to the
old location as we get things updated. Please feel free to open
any issues for link problems you find just so we don't miss
anything.
* Get contextual documentation when calling built-in functions
- Following PR #1654, the Regal language server will now offer
signatureHelp to compatible clients. This shows the current
argument type and description in the help text for built-in
functions. This is in addition to the other general function
documentation displayed here.
* Quickly see related fields in when editing METADATA
- PR #1657 implements support for the documentHighlight request
from clients. This is currently only used to show signal
other related METADATA keys when working with Rego metadata.
In future, this same functionality could be used to highlight
other related items currently in the viewport.
* Jump directly from ignore directives to documentation
- documentLink is another request from clients which allow the
server to respond with link ranges. We have used this to make
regal ignore directives clickable, helping users quickly
learn what they mean when encountered in policies PR #1657.
* Get live diagnostics from custom rules as you type
- PR #1631 ensures that users of custom linter rules are also
able to access these for live diagnostics in language server
clients. Previously these were not evaluated in the server,
only in the Regal CLI.
* Notable Refactors & Development Changes
- Rego Language Server Routing: PR #1675 makes some notable
changes to how Rego is used within the Regal’s language
server. The Language Server Protocol (LSP), which Regal
implements to support LSP clients, is based on JSON message
passing. This lends itself to Rego evaluation which is JSON
in, JSON out. This PR updates the handling of different LSP
messages sent from clients to route them in Rego, handling
Rego backed rules first, and falling back to Golang
implementations that still remain otherwise. This sets the
direction for more Rego LSP functionality in the language
server in future.
- Development bundle loading from disk: PR #1646 gives those
working on Regal in development the option of using the
current source for the Regal bundle without rebuilding the
binary. This improves the experience when working on Rego
based language server functionality by reducing the time of a
feedback loop. Set REGAL_BUNDLE_PATH to use this feature.
* Changelog
- 1f1044f: build: Remove tap key (#1687) (@charlieegan3)
- build(deps): bump github/codeql-action from 3.29.0 to 3.29.1
in the dependencies group by @dependabot[bot] in #1616
- Add Regal bundle compilation benchmark by @anderseknert in
#1618
- Remove quotes from keywords in refs by @anderseknert in #1619
- lsp: Skip loading files on disk when in cache by
@charlieegan3 in #1620
- build(deps): bump the dependencies group with 2 updates by
@dependabot[bot] in #1621
- automated: update capabilities by @github-actions[bot] in
#1622
- add experimental lsp package for websocket communication by
@srenatus in #1623
- internal/io: add FindInputPath when the content isn't needed
by @srenatus in #1624
- build(deps): bump github/codeql-action from 3.29.2 to 3.29.3
in the dependencies group by @dependabot[bot] in #1626
- lsp/completions: Handle hyphenated package names by
@charlieegan3 in #1625
- lsp: fix didOpen templating race by @charlieegan3 in #1627
- build/lsp: add web client demo by @srenatus in #1629
- lsp: Fix stale diagnostics after deletion by @charlieegan3 in
#1628
- Some doc updates by @anderseknert in #1632
- lsp: Add support for custom rules by @charlieegan3 in #1631
- Vendor roast dependency by @anderseknert in #1634
- lsp: Address windows goto definition URI issue by
@charlieegan3 in #1633
- Fix regal new rule issues + refactor io code by @anderseknert
in #1636
- lsp: Use full text replacement for Intellij fmt by
@charlieegan3 in #1637
- test: refactor e2e test, add new regal command runner by
@anderseknert in #1640
- build(deps): bump github/codeql-action from 3.29.3 to 3.29.5
in the dependencies group by @dependabot[bot] in #1641
- Fix missing source.explore code action by @anderseknert in
#1643
- lsp: Present filename relative to root in errors by
@charlieegan3 in #1638
- refactor: Improve code quality throughout the codebase by
@anderseknert in #1642
- lsp/uri: Refactor URI handling by @charlieegan3 in #1644
- Tidying up more code by @anderseknert in #1645
- Provide development option to load bundle from disk by
@anderseknert in #1646
- lsp/eval: Ensure filenames use URI in print output by
@charlieegan3 in #1647
- Rewrite more completion providers in Rego. Resolve schemas at
runtime. by @anderseknert in #1652
- lsp: Add signature help by @charlieegan3 in #1654
- lsp: Fix server signature race in test by @charlieegan3 in
#1655
- build(deps): bump the dependencies group with 5 updates by
@dependabot[bot] in #1639
- build(deps): bump the dependencies group with 3 updates by
@dependabot[bot] in #1653
- docs: update README badges for OPA 1.7.1 release by
@charlieegan3 in #1656
- New LSP features and internal improvements by @anderseknert
in #1657
- lsp/documenthighlight: Add tests by @charlieegan3 in #1659
- Add tests for textDocument/documentLink handler by
@anderseknert in #1658
- Styra URLs -> OPA URLs by @anderseknert in #1662
- docs: Update README re: move to open-policy-agent by
@charlieegan3 in #1664
- internal/io: explicitly disable lazy loading of regal bundle
by @srenatus in #1666
- build(deps): bump the dependencies group across 1 directory
with 4 updates by @dependabot[bot] in #1663
- Enable pprof endpoint only with env var set by @anderseknert
in #1667
- docs: Remove update workflow & minor adjustments by
@charlieegan3 in #1668
- Disable Codecov PR comments by @anderseknert in #1670
- deps: OPA v1.8.0 by @anderseknert in #1669
- docs: Changes needed in docs for opa site deploy by
@charlieegan3 in #1673
- build(deps): bump github/codeql-action from 3.29.11 to 3.30.0
in the dependencies group by @dependabot[bot] in #1674
- Rego-based routing of Rego handlers + refactor by
@anderseknert in #1675
- Just one more.. refactor by @anderseknert in #1677
- docs: Updates in preparation for OPA site deploy by
@charlieegan3 in #1676
- lsp: GTD use URI for location by @charlieegan3 in #1680
- fix: Don't use OS path separator when walking FS by
@anderseknert in #1681
- build(deps): bump the dependencies group with 3 updates by
@dependabot[bot] in #1678
- build: Add windows runners to build workflow by @charlieegan3
in #1682
- Weekend refactor by @anderseknert in #1684
- Fix documentLink issue when no user config provided by
@anderseknert in #1686
- build: Remove tap key by @charlieegan3 in #1687
-------------------------------------------------------------------
Tue Jul 01 10:15:29 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- Update to version 0.35.1 (0.35.0 was not released):
We're happy to release v0.35.1, the mid-summer release of Regal
for the 🏖️ ! This release updates to OPA v1.6.0 bringing a number
of performance improvements as well as other improvements and bug
fixes.
* Improved Schema Loading This PR replaces Regal's custom schema
loader with one that matches OPA's behavior, enabling the same
schemas to work across opa check, opa eval, and other OPA
commands. PR #1605
* Performance Improvements
- Thanks to a PR in OPA, Regal's memory use is now much reduced
due to a change conditionally supplying built-in contexts
only when needed.
- This PR optimizes Rego evaluation by directly mapping source
data to ast.Value objects instead of going through
intermediate map[string]any or JSON representations,
eliminating ~2.9 million allocations in benchmarks. PR #1606
- Regal contributors will be happy with
open-policy-agent/opa#7442 which makes running Regal's tests
around 2.5x as fast!
* Code Actions Rewrite
- Code actions are LSP features that provide automated fixes or
refactoring suggestions (like "quick fix" options), and this
PR implements them for Regal with server-side filtering to
reduce data transfer and ensure consistent editor behavior.
This is also now implemented in Rego! PR #1604
* Docs
- PR #1584 refactors a number of Regal's pages including
breaking down the previously large README into separate
files. Browse the new structure on the Regal Website.
- The Code Lens documentation has been updated to better
explain supported configurations. Thanks @Shinzu for the
report here. #1596
* Changelog
- 92d1ba9: deps: Update OPA to v1.6.0 (#1617) (@charlieegan3)
- 2bbe76e: [create-pull-request] automated change (#1582)
(@github-actions[bot])
- 6e5e6bb: e2e: add frankenstein test build (@srenatus)
- 5bf607d: build(deps): bump github/codeql-action in the
dependencies group (#1585) (@dependabot[bot])
- 6f45a9f: build(deps): bump brace-expansion from 2.0.1 to
2.0.2 in /build (#1587) (@dependabot[bot])
- e85b878: docs: Update config cli docs (#1584) (@charlieegan3)
- 30c73fe: build(deps): bump github/codeql-action in the
dependencies group (#1595) (@dependabot[bot])
- b8f3e8f: fix: improve snippets suggestion condition (#1597)
(@anderseknert)
- eb48984: Fix issue with handling big numbers (#1599)
(@anderseknert)
- 1ee1cf4: fix: Correct end location in unresolved-reference
(#1600) (@anderseknert)
- e50c9af: Bump Roast -> v0.12.0 (#1601) (@anderseknert)
- 981d8d2: docs: Update Evaluation Code Lens docs (#1602)
(@charlieegan3)
- 3577efe: lsp/completion/input: don't suggest 'input'
following dot (#1603) (@srenatus)
- 02d1546: lsp: Code Action feature rewritten in Rego (#1604)
(@anderseknert)
- 25b1072: More robust loading of schemas (#1605)
(@anderseknert)
- 112dc87: perf: avoid JSON/map roundtrips in ast.Value
transforms (#1606) (@anderseknert)
- d87fd2f: docs: Tone down "obsolete" description for
use-rego-v1 (#1610) (@anderseknert)
- a939219: lsp: Roll over load file failures (#1611)
(@charlieegan3)
- 1d771ca: interning: bump opa+roast, replace call to
ast.InternedBoolTerm() (#1613) (@srenatus)
- ed0ead4: build(deps): bump
github.com/go-viper/mapstructure/v2 in /e2e/testbuild (#1615)
(@dependabot[bot])
- 0d65ef0: build(deps): bump
github.com/go-viper/mapstructure/v2 (#1614)
(@dependabot[bot])
-------------------------------------------------------------------
Wed Jun 04 18:37:17 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- Update to version 0.34.1:
This patch release fixes a bug found since v0.34.0 as well as it
bumps the OPA dependency to the v1.5.1 patch also released today.
While Regal's own policies were not affected by the regression in
walk, custom linter rules could very well be.
* Highlights
- OPA v1.5.0 -> v1.5.1
- Go 1.23 -> 1.24
- Fix false positive in sprintf-arguments-mismatch when the
%-*s pattern was used for padding.
* Changelog
- OPA v1.5.1 and some perf tweaks (#1580)
- docs: Update typo in link (#1581)
- deps: Revert 47c70f0 tablewriter changes (#1579)
- docs: Update to allow better regal docs generation (#1578)
- [create-pull-request] automated change (#1577)
- fix: consider padding pattern in sprintf-arguments-mismatch
(#1575)
- build(deps): bump ossf/scorecard-action in the dependencies
group (#1576)
- Fix deprecated notices in .goreleaser.yaml (#1570)
- Go 1.23 -> 1.24 (#1573)
-------------------------------------------------------------------
Sat May 31 07:05:06 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- Update to version 0.34.0:
After a month of development, we're happy to announce Regal
v0.34. This version of the OPA community's favorite linter and
language server brings you new 3 linter rules, performance
improvements and much more.
With the v0.34.0 release, Regal now ships with more than 100
linter rules!
Which is pretty close to one new week per rule since the project
started.
* New rules
- unresolved-reference
This one is particularly exciting! The new
unresolved-reference rule reports any references (like
data.users.permissions) that cannot be resolved (i.e. found)
anywhere in the project. Some projects will have valid
references that can't be resolved at the time Regal lints the
project, and the rule provides configuration options to mark
certain references, or entire paths (like data.users.*) as
resolved. See the docs for the rule for more details.
- pointless-import
Category: imports
The new pointless-import rule will flags imports of the same
package, and other import forms where the import has no real
effect.
- single-item-in
Category: idiomatic
The single-item-in rule reports cases of in being used on a
single item collection, and suggests using an equality check
instead.
* Performance
- Use OPA v1.5.0, which brings performance improvements to walk
reducing linting time by about 10%.
- Faster linting by avoiding walk in a few locations where
possible.
- Improve performance of aggregate rules.
- Several performance optimizations to Regal's linter rules.
* API
- The linter API now has a new Prepare method that can be used
to prepare the linter before reusing it across several runs.
* Various
- Some rules that would previously only scan the topmost level
of a rule body will now recursively scan the whole rule.
- The input completions provider has been rewritten in Rego
(previously Go).
- The automatic version check has been rewritten in Rego
(previously Go).
* Bugs
- Fix false positive in custom one-liner-rule.
* Docs
- Updated roadmap. Go check it out!
- Move rules table from README and into a more interactive form
on the Styra docs. Take a look!
- Add link to Renovating Rego blog.
- README: add link to KubeCon London talk, which prominently
featured Regal.
- Update links to adapt to OPA's new documentation.
- Update outdated information in README.
* Dependencies
- build(deps): bump the dependencies group with 2 updates
(#1551)
- build(deps): bump the dependencies group with 2 updates
(#1544)
- build(deps): bump the dependencies group with 2 updates
(#1521)
- build(deps): bump github/codeql-action in the dependencies
group (#1507)
-------------------------------------------------------------------
Thu Apr 24 15:08:26 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- Update to version 0.33.1:
This release is the same tag as v0.33.1, please see that release
for the release notes.
Another v0.33.1 was released to trigger the rebuilding of some
assets that were deleted in a draft release.
* New Rule: in-wildcard-key
Using a wildcard variable (_) for the key in the key-value form
of iteration (some _, value in collection) is never needed, and
can be replaced by the simple some value in … form . This rule
flags cases where the key iteration is redundant. (Read more)
* New Rule: confusing-alias
While import aliases can improve readability, aliasing an
import reference that is also imported without an alias is
confusing, as both names point to the same resource. This rule
catches such cases. (Read more)
* New Rule: mixed-iteration
Rego supports different styles of collection iteration. While
"reference style" iteration (collection[_]) can be concise for
deeply nested structures, mixing it with the some .. in style
within a single iteration expression makes for code that’s more
difficult to follow. This rule encourages consistency within a
single iteration statement. (Read more)
* New Rule: narrow-argument
This new rule analyzes function arguments to suggest narrowing
them down to the minimal value the function depends on. This
can improve clarity and reusability. The rule considers
incrementally defined functions across all their definitions.
This is a powerful but opinionated rule and is thus in the
custom category and is not on by default. See the documentation
for how to enable it if you’re curious to try it out! (Read
more)
* Performance Improvements
Several improvements have been made to reduce memory
allocations and improve overall linting performance. Numbers
below refer to Regal’s benchmark for linting its own policies.
- Optimized config loading and parsing, saving around 2.7
million allocations (#1491).
- Reduced allocations by approximately 2 million (#1494).
- Improved the performance of the use-strings-count rule,
saving almost 1 million allocations (#1465).
- Optimized reference comparisons and small iteration patterns,
saving around 300k allocations (#1472).
- Included performance enhancements alongside an update to the
external-reference rule to make it more configurable (#1496).
* OPA v1.3.0
Regal has been upgraded to use OPA v1.3.0. This brings several
upstream improvements, including support for the new one-liner
grouping in formatting (see OPA#6760). (#1459)
* Bug Fixes
- Fixed a bug in the handling of Rego input from stdin. Thanks
@tokyowizard for the report! (#1474)
- Fixed a panic that could occur in FindConfigRoots when
supplied with unexpected arguments. (#1487)
* Other Rule Updates
- The external-reference rule can now be configured with a
maximum number of allowed external references, instead of
solely flagging all external uses within a function. If you
previously had this rule disabled, you might want to try
enabling it now, and possibly tweak its configuration to your
liking. (#1496)
- The rule-length rule now has a separate setting
(max-test-rule-length) with a higher default value (60 vs 30)
for test rules, acknowledging that tests often include
substantial data. (#1476)
- Updated documentation for the rule-named-if rule based on
community feedback received via the page feedback form
(please let us know if you see issues! & thanks for the
report!) (#1463)
* Dependencies
This release also updates Regals dependencies as follows.
- github.com/open-policy-agent/opa v1.2.0 -> v1.3.0
- github.com/prometheus/client_golang v1.21.0 -> v1.21.1
- go.opentelemetry.io/otel v1.34.0 -> v1.35.0
- go.opentelemetry.io/otel/metric v1.34.0 -> v1.35.0
- go.opentelemetry.io/otel/sdk v1.34.0 -> v1.35.0
- go.opentelemetry.io/otel/trace v1.34.0 -> v1.35.0
- golang.org/x/crypto v0.35.0 -> v0.36.0
- golang.org/x/net v0.36.0 -> v0.38.0
- golang.org/x/sync v0.11.0 -> v0.12.0
- golang.org/x/sys v0.30.0 -> v0.31.0
- golang.org/x/text v0.22.0 -> v0.23.0
- google.golang.org/protobuf v1.36.4 -> v1.36.5
* Changelog
- automated: update capabilities by @github-actions in #1458
- OPA 1.3.0 by @anderseknert in #1459
- Parameterize some tests by @anderseknert in #1460
- automated: update capabilities by @github-actions in #1461
- build(deps): bump the dependencies group with 2 updates by
@dependabot in #1462
- docs: rule-named-if by @charlieegan3 in #1463
- Some perf fixes by @anderseknert in #1465
- Rule: in-wildcard-key by @anderseknert in #1466
- Increase coverage by @anderseknert in #1467
- build(deps): bump github/codeql-action from 3.28.13 to
3.28.14 in the dependencies group by @dependabot in #1468
- perf: various improvements by @anderseknert in #1472
- Rule: confusing-alias by @anderseknert in #1470
- Add benchmark for testing all rules individually by
@anderseknert in #1469
- Rule: mixed-iteration by @anderseknert in #1475
- Add max-test-rule-length setting to rule-length rule by
@anderseknert in #1476
- fix: ensure policy from stdin is enumerated correctly by
@anderseknert in #1474
- automated: update capabilities by @github-actions in #1477
- builtins.RegalIsFormatted: recover from formatter panics by
@srenatus in #1481
- automated: update capabilities by @github-actions in #1482
- build(deps): bump github/codeql-action from 3.28.14 to
3.28.15 in the dependencies group by @dependabot in #1484
- Fix unnecessary-some rule not working after OPA 1.0+ by
@anderseknert in #1485
- FindConfigRoots: return error, not panic by @srenatus in
#1487
- perf: Improve how config is parsed, and when by @anderseknert
in #1491
- Rule: narrow-argument by @anderseknert in #1488
- build(deps): bump golang.org/x/net from 0.37.0 to 0.38.0 by
@dependabot in #1490
- build(deps): bump codecov/codecov-action from 5.4.0 to 5.4.2
in the dependencies group by @dependabot in #1495
- Make external-reference rule less annoying by @anderseknert
in #1496
- docs: fix docs that still used v0 syntax by @anderseknert in
#1494
-------------------------------------------------------------------
Fri Mar 28 06:38:00 UTC 2025 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- new package regal: linter and language server for Rego, bringing
your policy development experience to the next level