Update dependency StyraInc/regal to v0.26.2 #325
Merged
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.25.0
->v0.26.2
Release Notes
StyraInc/regal (StyraInc/regal)
v0.26.2
Compare Source
This releases contains a bug fixes for an issue introduced in v0.26.0 as well as a number of other minor improvements.
Notable Bug fixes:
use-some-for-output-vars
.manifest
files are correctly detected as 'roots' when fixingNew features:
Changelog
b1afdf6
: build(deps): bump peter-evans/create-pull-request from 7.0.0 to 7.0.1 (#1057) (@dependabot[bot])9c6a0c9
: completion: Don't show builtins on default rules (#1056) (@charlieegan3)dd9ee43
: Increase test coverage (#1058) (@anderseknert)410d775
: lsp/completions: add boolean provider (#1059) (@charlieegan3)337862e
: tests: Fatal error when no inlay hints are found (#1060) (@charlieegan3)1ef7511
: cmd/fix: Only require git when dry-run unset (#1065) (@charlieegan3)8778ec2
: fix: Haveuse-some-for-output-vars
find comprehension body vars (#1069) (@anderseknert)d579c9c
: build: introduce regal_standalone build flag, use for lint's "fix" hint (#1070) (@srenatus)2690748
: 100% test coverage (#1074) (@anderseknert)2e07303
: Removeast.all_refs
(#1076) (@anderseknert)332f6dd
: Ensure custom rules docs are up to date (#1079) (@anderseknert)28bac91
: lsp: Address empty module issues on rename (#1078) (@charlieegan3)6badb5d
: lsp: Always send empty diagnostics when deleted (#1080) (@charlieegan3)146895c
: lsp: Correct Path to URI encoding (#1083) (@charlieegan3)71e17a3
: e2e: Sort output from fix hint (#1084) (@charlieegan3)a562087
: Fix issue where .manifest files didn't register as roots (#1081) (@anderseknert)786b89e
: Bump roast to v0.2.0 to ensure annotations encodes correctly (#1087) (@anderseknert)3bbfd1e
: Addregal eval:use-as-input
directive (#1088) (@anderseknert)0c1ef19
: lsp: Rename on template (#1085) (@charlieegan3)52f3377
: lsp: Fix Eval issue caused by missing comments (#1091) (@charlieegan3)6f9b32f
: cmd/fix: Address relative path root matching (#1093) (@charlieegan3)v0.26.1
Compare Source
This releases contains a bug fix for an issue introduced in v0.26.0. The bug was caused by a change the required data to complete a formatting Rego 'fix'.
Changelog
1cfdee9
: Fix LSP formatting that broke in v0.26.0 (#1055) (@anderseknert)v0.26.0
Compare Source
0.26.0
v0.26.0 brings 2 new linter rules to Regal, a debugger API backend, and noticeably faster linting.
Regal v0.26.0 is likely the first consumer of the new debugger API that landed in OPA v0.68.0 just last week — and in turn uses this to expose a first ever Debug Adapter Protocol (DAP) backend for Rego! Next release of the OPA VS Code extension will leverage Regal to provide developers a first-class debugging experience for Rego. Stay tuned!
Thanks to @johanfylling for tirelessly working to make this happen — in both OPA, Regal, and the OPA VS Code extension.
Rules
New rule:
directory-package-mismatch
Category:
idiomatic
The
directory-package-mismatch
rule is a first of its kind in Regal, as it reports issues in project structure rather than in code. This rule codifies an old best practice in Rego projects: thepackage
name (path) should be mirrored in the directory structure a policy resides in. Put simply, a policy declaringpackage rbac.user.roles
should be placed in arbac/user/roles
directory.The
directory-package-mismatch
rule not only helps enforce this convention, but provides both CLI (regal fix
) and editor support for fixing these issues automatically.Note: When used on an existing project, this rule will likely result in a lot of violations being reported. While
regal fix
can remediate that in a matter of seconds (by moving policy files according to their package paths), make sure to commit or stash any existing changes before running it, and then review the result. Read the docs for details!For more information, see the docs on directory-package-mismatch.
New Rule:
sprintf-arguments-mismatch
Category:
bugs
The new
sprintf-arguments-mismatch
rule checks that the formatting directives (%s
,%d
, etc) in asprintf
call match the supplied number arguments.Wrong
Correct
For more information, see the docs on sprintf-arguments-mismatch.
Debug Adapter Protocol Backend
This release add support in Regal for the Debug Adapter Protocol. Similar to the language server protocol, this new functionality will support users of compatible clients to step-by-step debug their Rego projects in an interactive manner. Client implementation in the VS Code OPA extension soon to follow!
Language Server: auto-completion based on
input.json
Both the OPA VS Code extension, and Regal supports placing an
input.json
file in the workspace and automatically have it used as input for evaluation. If found, Regal will now additionally use this to provide completion suggestions oninput
based on the fields found in that file. If you haven't made it a habit yet to keep aninput.json
file in your workspace, now is a good time to start!New RoAST library for custom AST serialization
Regal now uses a new, custom and optimized AST format to improve the performance of Regal. The new library is integrated into Regal in this release and represents around a 50% reduction in AST JSON size, and a 25% performance improvement in linting over the previous implementation.
For more information, see the docs in the roast project repo.
Special thanks to our contributors from the community!
Changelog
ee341d9
: cosmetic: fix a few typos (reprise) (#994) (@msorens)c70b0bd
: build(deps): bump dario.cat/mergo from 1.0.0 to 1.0.1 (#996) (@dependabot[bot])29a7bb5
: lsp: Update rego-by-examples index (#998) (@github-actions[bot])4bbeb59
: build(deps): bump github/codeql-action from 3.26.2 to 3.26.3 (#999) (@dependabot[bot])f28ac7d
: Use new Roast library for custom AST serialization (#1001) (@anderseknert)1fecb4c
: Addinput.json
completion provider (#1005) (@anderseknert)1ca1c0f
: build(deps): bump github/codeql-action from 3.26.3 to 3.26.4 (#1004) (@dependabot[bot])c9e4a7e
: Rule:sprintf-arguments-mismatch
(#1011) (@anderseknert)0f971ff
: build(deps): bump github/codeql-action from 3.26.4 to 3.26.5 (#1012) (@dependabot[bot])2c75c96
: Remove some code made redundant by roast (#1013) (@anderseknert)11320cd
: Pin OPA version in Actions to v0.67.1 (#1019) (@anderseknert)683f8de
: lint: Advertise regal fix command (#1016) (@charlieegan3)a9d4e2f
: Bug hunt (#1020) (@anderseknert)a92a31f
: fix: respect ref head rules inrule-name-repeats-package
(#1022) (@anderseknert)9ee83e8
: Rule:directory-package-mismatch
(#1024) (@anderseknert)afa1ee2
: build(deps): bump github/codeql-action from 3.26.5 to 3.26.6 (#1026) (@dependabot[bot])ebdc067
: Allow tests to be in 'test' package (#1027) (@anderseknert)b1551ee
: lsp: Clean workspace root from eval errors (#1028) (@charlieegan3)9cd3b05
: Add EOPA as an engine option (#1000) (@charlesdaniels)147a731
: Fix build issue + version in README (#1030) (@anderseknert)6fac539
: OPA v0.68.0 (#1031) (@anderseknert)29d16c6
: Remove code to workaround bug fixed in OPA v0.68.0 (#1032) (@anderseknert)1a58b8c
: Add DAP implementation for debugging OPA (#926) (@johanfylling)a525c98
: Some schema fixes (#1033) (@anderseknert)15ddb34
: Fix missing locals completions (#1034) (@anderseknert)7929744
: docs/editors: add helix config (#1037) (@srenatus)dc5ab30
: docs: Point LS feature links to docs site (#1038) (@charlieegan3)743975a
: build(deps): bump actions/upload-artifact from 4.3.6 to 4.4.0 (#1039) (@dependabot[bot])8e890ae
: Allow fixing directory structure not matching package paths (#1035) (@anderseknert)cc4ba21
: Add support for--dry-run
and dirty git workspace abort (#1042) (@charlieegan3)7da45a4
: build(deps): bump peter-evans/create-pull-request from 6.1.0 to 7.0.0 (#1041) (@dependabot[bot])ccb66fc
: Codecov experiment (#1045) (@anderseknert)fe9e0d9
: build: check yaml and json formatting with dprint (#1047) (@charlieegan3)02d9538
: Docs: Document fixing issues, project roots, and new features (#1043) (@anderseknert)fef46d7
: fix: Update root detection (#1049) (@charlieegan3)66a3a76
: lsp: Clear old directories when renaming (#1050) (@charlieegan3)7a4811b
: Fixdirectory-package-mismatch
issue when lint called with "." (#1053) (@anderseknert)ced7c70
: fix: Require use of --force to fix without git (#1052) (@charlieegan3)bf6e879
: lsp: Template new empty files & template on format (#1051) (@charlieegan3)Configuration
📅 Schedule: Branch creation - "before 4am 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.
This PR was generated by Mend Renovate. View the repository job log.