Update dependency StyraInc/regal to v0.33.1 #393
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.32.0
->v0.33.1
Release Notes
StyraInc/regal (StyraInc/regal)
v0.33.1
Compare Source
This release adds 4 new linter rules to Regal, alongside significant performance improvements and several bug fixes.
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 simplesome value in …
form . This rule flags cases where the key iteration is redundant. (Read more)PR #1466
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)
PR #1470
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 thesome .. 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)PR #1475
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)
PR #1488
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.
use-strings-count
rule, saving almost 1 million allocations (#1465).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
FindConfigRoots
when supplied with unexpected arguments. (#1487)Other Rule Updates
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)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)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.
Go Mod:
GitHub Actions:
Changelog
Full Changelog: StyraInc/regal@v0.32.0...v0.33.1
v0.33.0
Compare Source
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.
Configuration
📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 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.