Update dependency StyraInc/regal to v0.31.0 #364
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.30.2
->v0.31.0
Release Notes
StyraInc/regal (StyraInc/regal)
v0.31.0
Compare Source
This release of Regal updates to OPA v1.1.0, continuing to solidify support for v1 Rego with some nice new rules, performance improvements and bug fixes too.
New Rule:
use-object-keys
There are some cases where using
object.keys
is preferred over using comprehensions. For example:Avoid
Prefer
This is preferred as it more clearly communicates the intent of the code, that is, to get the keys of the object rather than loop over it and collect the keys as you go. More details can be found on the use-object-keys rule page.
New Rule:
non-loop-expression
Expressions in loops are evaluated in each iteration of the loop and so it's advisable to avoid using expressions which do not depend on the loop variable within the looping part of a rule in order to improve performance.
Avoid
Prefer
This rule can't catch all cases, so still be on the look out. More details can be found on the non-loop-expression rule page.
Fixing
non-raw-regex-pattern
The
non-raw-regex-pattern
rule can now be automatically fixed withregal fix
or with a CodeAction for language server clients. https://github.com/StyraInc/regal/pull/1382Configuration File Loading
Regal will now use a
~/.config/regal
if no parent configuration is found. This is useful when working on Rego in temporary directories. https://github.com/StyraInc/regal/pull/1378Regal's language server will now use configuration files in the workspace tree if they exist rather than only looking at parent directories. This more closely matches the behavior of the lint command. https://github.com/StyraInc/regal/pull/1372
Notable Improvements
opa-fmt
rule using in Rego, removing the need for a Go rulelinting path entirehttps://github.com/StyraInc/regal/pull/13931393
https://github.com/StyraInc/regal/pull/1392139https://github.com/StyraInc/regal/pull/1383138https://github.com/StyraInc/regal/pull/137913https://github.com/StyraInc/regal/pull/1358135https://github.com/StyraInc/regal/pull/1356135https://github.com/StyraInc/regal/pull/13551355
deprecated-builtin
rule now explains the upgrade process. https://github.com/StyraInc/regal/pull/1366, thanks @tsandall for the suggestion!Notable Fixes & Updates
use-if
rule will now use only the rule name as the violation location, rather than the whole rule. https://github.com/StyraInc/regal/pull/1362after a regressihttps://github.com/StyraInc/regal/pull/14081408
fixing a bug where the Debug CodeLens was left enabled.
.regal.yaml
file use. https://github.com/StyraInc/regal/pull/1357, thanks @grosser for the input here.Changelog
1eff70a
: fix: lsp - filter outregal.debug
codelens (#1345) (@jglasovic)93faa40
: [create-pull-request] automated change (@charlieegan3)193224a
: [create-pull-request] automated change (@charlieegan3)434dabf
: build(deps): bump golangci/golangci-lint-action (#1350) (@dependabot[bot])d7f522e
: Add workspace folder type, and "support" that capability (#1347) (@anderseknert)a5d1742
: Language server refactoring (#1349) (@anderseknert)7b693ee
: perf: move config check out of loop (#1351) (@anderseknert)d9749f4
: lsp: Ensure parse errors are saved as diagnostics correctly (#1352) (@charlieegan3)bea7398
: Fix missing annotations in LSP parsing (#1354) (@anderseknert)0a17534
: chore: Use regal's parse options following (#1355) (@charlieegan3)760b484
: fix: Remove mandatory fixes (#1356) (@charlieegan3)2b25493
: config: Search for .regal.yaml and use for roots (#1357) (@charlieegan3)6880526
: Remove custom Ref stringer (#1359) (@anderseknert)0d506bb
: refactor: better use of test helpers (#1358) (@anderseknert)b29ad44
: perf: always includeignore_files
in data (#1360) (@anderseknert)856bf50
: The compact output format should include a summary #1364 (#1369) (@anaypurohit0907)9020000
: Some style fixes (#1370) (@anderseknert)f78f94b
: fix: better location reporting inuse-if
rule (#1362) (@anderseknert)1175266
: docs: deprecated built-in replacements (#1366) (@anderseknert)33408e5
: Add optional govet checks (#1368) (@anderseknert)1db229a
: Small fixes (#1367) (@anderseknert)6430f86
: build(deps): bump the dependencies group with 3 updates (#1371) (@dependabot[bot])14cbc3b
: Bump OPA to v1.1.0 (#1373) (@anderseknert)e1247ea
: Don't return error fromregal.last
(#1374) (@anderseknert)0e794a2
: lsp: Use nested workspace configuration if found (#1372) (@charlieegan3)d41c3da
: [create-pull-request] automated change (#1376) (@github-actions[bot])1f9e2e4
: Use .Keys() and .KeysSorted() from OPA (#1379) (@anderseknert)a295fef
: config: Use global user config if required (#1378) (@charlieegan3)1a3fcfb
: linter: Show error if rule or category is invalid (#1381) (@charlieegan3)0e38b37
: Add a few more adopters (#1384) (@anderseknert)cb81676
: build(deps): bump the dependencies group with 2 updates (#1385) (@dependabot[bot])4777c2b
: build(deps): bump github/codeql-action in the dependencies group (#1386) (@dependabot[bot])be9bc33
: fix: non-raw regex pattern (#1382) (@charlieegan3)13a4980
: lsp: Add statsviz for profiling visuals (#1388) (@charlieegan3)ba53d75
: Consistently use newSet
type (#1383) (@anderseknert)4347b8a
: lsp/test: Error in test should be log instead (#1389) (@charlieegan3)8c15f1c
: [create-pull-request] automated change (@charlieegan3)a283bee
: Remove unused fixer code (#1392) (@anderseknert)194116f
: Rego-based opa-fmt (#1393) (@anderseknert)69e3756
: Be specific about number of errors vs warnings in regal lint summary #821 (#1387) (@anaypurohit0907)48c9e5e
: Some minor cleanups in reporter code (#1397) (@anderseknert)a4e3592
: Fix false positive inunused-output-variable
(#1398) (@anderseknert)c75d66f
: Rule:use-object-keys
(#1399) (@anderseknert)52c7c9b
: refactor: simplify data bundle creation (#1400) (@anderseknert)3e6ef5b
: [create-pull-request] automated change (#1402) (@github-actions[bot])674e441
: lsp: update log messages for root dir note (#1395) (@charlieegan3)76e0760
: build(deps): bump the dependencies group with 2 updates (#1404) (@dependabot[bot])c6d1a9d
: Roast v0.8.1 (#1406) (@anderseknert)539ba39
: bundle: Add non-loop-expression rule (#1401) (@charlieegan3)06af4df
: lsp: Correctly parse eval and debug params (#1407) (@charlieegan3)b29e759
: lsp: show parse errors in diagnostics (#1408) (@charlieegan3)Configuration
📅 Schedule: Branch creation - "* 0-3 * * 1" (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.