Update go modules (main) (minor) #1632
Open
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:
v0.63.0→v0.66.0v0.29.2→v0.38.1Release Notes
open-policy-agent/conftest (github.com/open-policy-agent/conftest)
v0.66.0Compare Source
Changelog
OPA Changes
08529c7: build(deps): bump github.com/open-policy-agent/opa from 1.11.0 to 1.12.1 (#1240) (@dependabot[bot])Other Changes
10434c1: build(deps): bump actions/setup-python from 6.0.0 to 6.1.0 (#1225) (@dependabot[bot])25bee5d: build(deps): bump alpine from 3.22.2 to 3.23.0 (#1229) (@dependabot[bot])6cafc0f: build(deps): bump github.com/BurntSushi/toml from 1.5.0 to 1.6.0 (#1238) (@dependabot[bot])f6b8fa9: build(deps): bump github.com/moby/buildkit from 0.26.2 to 0.26.3 (#1235) (@dependabot[bot])233776f: build(deps): bump golang from 1.25.4-alpine to 1.25.5-alpine (#1228) (@dependabot[bot])7a86f94: chore: Remove dependency on github.com/pkg/errors (#1233) (@jalseth)5a394b8: ci(golangci-lint): Disable revive skip-package-name-collision-with-go-std (#1232) (@jalseth)v0.65.0Compare Source
Changelog
New Features
7de1f99: feat: Add location to SARIF output (#1207) (@jalseth)Bug Fixes
94bb769: fix(build): Include Git version when using 'make build' (#1218) (@jalseth)ff4e456: fix(sarif): Include conftest version number (#1206) (@jalseth)OPA Changes
8c4cfa6: build(deps): bump github.com/open-policy-agent/opa from 1.10.1 to 1.11.0 (#1224) (@dependabot[bot])Other Changes
3dab980: build(deps): bump cuelang.org/go from 0.15.0 to 0.15.1 (#1217) (@dependabot[bot])cfa85ca: build(deps): bump github.com/moby/buildkit from 0.25.2 to 0.26.2 (#1216) (@dependabot[bot])dd7e3bc: build(deps): bump golang from 1.25.3-alpine to 1.25.4-alpine (#1210) (@dependabot[bot])bbbb04c: chore: Include goreleaser in Nix devshell (#1219) (@jalseth)ac3146f: ci: Pin GitHub Actions to the Git SHA using ratchet (#1204) (@jalseth)v0.64.0Compare Source
Changelog
New Features
00b02b2: feat: Include location in the result output (#1196) (@jalseth)ee91078: feat: Refactor GitHub outputter to support locations from Rego policy (#1197) (@jalseth)d359466: feat: add conftest-fmt and conftest-pull pre-commit hooks (#1192) (@dkolepp)Bug Fixes
997f5ce: fix: Fix XDG writable check on Windows (#1185) (@jalseth)fb9c88d: fix: Only use XDG directories for plugin if they are writable (#1182) (@jalseth)4a2ddd6: fix: Use "python3" instead of "python" in the Makefile (#1184) (@jalseth)OPA Changes
347388d: build(deps): bump github.com/open-policy-agent/opa from 1.9.0 to 1.10.1 (#1201) (@dependabot[bot])Other Changes
75449c3: build(deps): bump alpine from 3.22.1 to 3.22.2 (#1191) (@dependabot[bot])0ade44b: build(deps): bump cuelang.org/go from 0.14.1 to 0.15.0 (#1202) (@dependabot[bot])1ef4588: build(deps): bump github.com/hashicorp/go-getter from 1.8.2 to 1.8.3 (#1199) (@dependabot[bot])d2e56c3: build(deps): bump github.com/moby/buildkit from 0.25.0 to 0.25.2 (#1200) (@dependabot[bot])5242185: build(deps): bump golang from 1.25.1-alpine to 1.25.3-alpine (#1193) (@dependabot[bot])58ace24: build: Add Nix devshell (#1186) (@jalseth)6189512: chore: Fix gitignore for acceptance tests (#1195) (@jalseth)7d41238: ci: Run validation job on Linux, macOS, Windows (#1181) (@jalseth)styrainc/regal (github.com/styrainc/regal)
v0.38.1Compare Source
This patch release fixes several bugs including some found in the recent v0.38.0 release, as well some other improvements.
Bug Fixes
prefer-equals-comparisonfixer failing to parse policies with multiple "=" in expressions (#1824, fixes #1818 reported by @gusega)prefer-equals-comparisonrule with comprehension term vars (#1828, fixes #1826 reported by @SeanLedford)Improvements
prefer-equals-comparisonfixer now available in the language server (#1810)prefer-value-in-headrule to count interpolated strings as scalars (#1817)any_set_item, used for selecting items from sets (#1815)Changelog
f1c5f74: bundle: Improve performance of any_set_item (#1815) (@charlieegan3)9300420: Implemented Code action for prefer-equals-comparison fixer (#1810) (@SeanLedford)28121f0: build(deps): bump github/codeql-action in the dependencies group (#1823) (@dependabot[bot])54cdcb6: Addprefer-value-in-headoption to count interpolated string as scalar (#1817) (@anderseknert)e68184d: Fix false positivie in prefer-equals-comparison (#1828) (@anderseknert)593e221: fix: Prefer-Equals-Comparison Edge Case With Multiple "=" (#1824) (@SeanLedford)3dc28bb: bundle: Surface configured rule notices (#1827) (@charlieegan3)aac9618: Updated lint reporter to track fixable violation count separate from fixable violation Set (#1825) (@SeanLedford)fd6dd4d: Updated example for prefer-equals-comparison edge case to not include false positive (#1829) (@SeanLedford)v0.38.0Compare Source
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-v1Category:
customThis 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.
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:
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
ac35695: Various performance improvements (#1758) (@anderseknert)48cd03d: docs: Add custom head for regal index page (#1761) (@charlieegan3)728ae28: build(deps): bump golangci/golangci-lint-action (#1762) (@dependabot[bot])92cf6ca: explorer: allow hiding stages without an effect (+misc) (#1760) (@srenatus)c000994: docs: Correct sidebar labels (#1763) (@charlieegan3)bf0b621: build(deps): bump github.com/containerd/containerd/v2 in /e2e/testbuild (#1753) (@dependabot[bot])18e7a89: build(deps): bump github.com/containerd/containerd/v2 (#1754) (@dependabot[bot])ccab7bd: Rename: encoding/util -> encoding/write (#1764) (@anderseknert)54f7625: build: run windows in matrix with other jobs (#1770) (@charlieegan3)5c9e6f0: update: Update version checking logic (#1772) (@charlieegan3)5034776: build: Add badge update to readme script (#1773) (@charlieegan3)95e8220: Added OPA installation as a Regal prerequisite, and fixed golangci-lint link. (#1774) (@SeanLedford)149f71d: build(deps): bump js-yaml from 4.1.0 to 4.1.1 in /build (#1775) (@dependabot[bot])b8f8b7f: Enable more golangci-lint linters (@anderseknert)e092627: build: Update mac runner (@charlieegan3)877884c: lsp: Add code action and command to ignore rule (#1777) (@charlieegan3)ece9ca2: build(deps): bump the dependencies group with 5 updates (@dependabot[bot])bd37bbd: build(deps): bump golang.org/x/crypto in /build/lsp (@dependabot[bot])17cc429: build(deps): bump golang.org/x/crypto in /e2e/testbuild (@dependabot[bot])415b05f: build(deps): bump golang.org/x/crypto from 0.43.0 to 0.45.0 (@dependabot[bot])e1bb975: Improve fixer performance (@anderseknert)1b083ff: Added Rule: Disallow import rego.v1 (#1778) (@SeanLedford)9e43c50: Optimize and improve code for built-in functions (@anderseknert)64ce2aa: build(deps): bump glob and markdownlint-cli in /build (#1779) (@dependabot[bot])48fddeb: build(deps): bump github/codeql-action in the dependencies group (#1787) (@dependabot[bot])bc41f63: pkg/linter: use errgroup, set limits + context on it (@srenatus)f22c2aa: Add fixer for prefer-equals-comparison rule (#1790) (@SeanLedford)cf88eb9: Fixers for redundant-existence-check and constant-condition rules (#1794) (@SeanLedford)36401a2: build(deps): bump the dependencies group across 1 directory with 7 updates (#1796) (@dependabot[bot])ecb23d3: version: Add OPA version to version output (#1798) (@charlieegan3)94ce038: build(deps): bump golang.org/x/crypto from 0.43.0 to 0.45.0 in /build/ws (#1791) (@dependabot[bot])9ce1ddd: workflows: add post-merge benchmark-recording workflow (@srenatus)e111443: workflows/benchmark: fix golang setup (@srenatus)4bb2d5a: docs: Update messy rule docs (@charlieegan3)dec83ea: docs: Updates from opa website link scanner (@charlieegan3)8f544a6: fix typo in fix.go help message (#1807) (@gusega)941b02e: build(deps): bump the dependencies group with 3 updates (#1804) (@dependabot[bot])9f09e6e: build(deps): bump the dependencies group with 4 updates (#1808) (@dependabot[bot])476ef89: OPA v1.12.2 and full string interpolation support (#1811) (@anderseknert)a9843ab: Movechained-rule-bodytocustomcategory (#1812) (@anderseknert)v0.37.0Compare Source
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!
Changelog
244459c: docs: Remove some old references (#1689) (@anderseknert)4212b5c: build(deps): bump the dependencies group with 2 updates (#1690) (@dependabot[bot])e149c6d: build: reduce update-caps top-level workflow permission to read (#1691) (@timothyklee)819bbec: lsp: Fix missing initial root (#1692) (@charlieegan3)be8b020: docs: Update style guide links to new repo (#1693) (@charlieegan3)ceb890b: Builtin function completion in Rego (#1694) (@anderseknert)d36555e: Package ref import suggestions in Rego (#1698) (@anderseknert)4e44131: build(deps): bump the dependencies group with 2 updates (#1703) (@dependabot[bot])14166e9: Avoid multi-line highlighting of issues (#1702) (@anderseknert)1685bb8: Move completion handler into Rego router (#1699) (@anderseknert)0da5eaa: build(deps): bump the dependencies group with 2 updates (#1708) (@dependabot[bot])e792757: Bump OPA -> v1.9.0, golangci-lint 2.5.0 (#1709) (@anderseknert)3092d1d: docs: Address some broken links from OPA report (#1704) (@charlieegan3)bebfd06: util: use Partial2 for IsAnyError (@srenatus)f22a570: Fix false positive inredundant-existence-check(#1716) (@anderseknert)2703715: Various fixes (#1715) (@anderseknert)87981f2: build(deps): bump the dependencies group with 2 updates (#1713) (@dependabot[bot])a6487b6: lsp: document highlighting supporting function args (#1718) (@anderseknert)fe8cbd3: Rule: prefer-equals-comparison (#1726) (@anderseknert)f3722ea: Fix false positive in narrow-argument (#1724) (@anderseknert)73b8c65: Improve pointless-reassignment to cover nested cases (#1727) (@anderseknert)9cf180c: lsp: Implement selection ranges and linked editing range (#1722) (@anderseknert)bf632d0: build(deps): bump the dependencies group with 2 updates (#1725) (@dependabot[bot])a373ae3: lsp: Use filename path for current buffer for defns (#1732) (@charlieegan3)d758eaf: lsp: Refactor range utilities (#1729) (@anderseknert)13de8a9: Fix incorrect behavior in pointless-import (#1733) (@anderseknert)fb560c1: Fix false positive in use-some-for-output-vars (#1731) (@anderseknert)70449b7: Various small fixes (#1736) (@anderseknert)2594719: windows: Better use of slash paths (#1737) (@charlieegan3)499125f: Get FindClosestMatchingRoot working on windows (#1740) (@charlieegan3)3715085: OPA v1.10.0 (#1742) (@anderseknert)781f809: deps: stick to github.com/vektah/gqlparser/v2@v2.5.30 (#1744) (@srenatus)bbb03db: Use generic client identifier in tests (#1741) (@charlieegan3)c42ce08: build(deps): bump github/codeql-action in the dependencies group (#1745) (@dependabot[bot])4384b0d: Remove go-semver dependency, plus various fixes (#1746) (@anderseknert)97dfbd4: docs: update LSP page to show new features (#1748) (@charlieegan3)818b33a: docs: Minor fixes to docs typos and links (#1747) (@charlieegan3)4138270: Update to OPA v1.10.1 (@charlieegan3)55cf029: lsp: ensure thatInitOptionsis never nil (#1752) (@srenatus)8ffa270: docs: add kakoune LSP config snippet (#1751) (@srenatus)216341a: reporter,lsp: update URLs for help links (#1750) (@srenatus)v0.36.1Compare Source
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 for users getting Regal via Homebrew
Since Regal was made an official formula, our recommendation has been to use that as your source for Regal. This is the first release distributed only via that formula, so if you still rely on the old
styrainc/regalone, make sure to have that removed andbrew install regalinstead.A note about Regal's documentation
Our documentation is now displayed as part of the main OPA website!
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
signatureHelpto 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
documentHighlightrequest 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
documentLinkis 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
REGAL_BUNDLE_PATHto use this feature.Changelog
1f1044f: build: Remove tap key (#1687) (@charlieegan3)Configuration
📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (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.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.