v0.18.0
Only a week after v0.17.0, this release comes a little earlier than planned as we found a few issues in the VS Code OPA extension integration that we wanted to address as soon as possible. Nothing serious, but having that extension provide a great Regal experience feels important enough for us to warrant an earlier v0.18.0 release. That's not all there is to this release though, as we have both a new linter rule as well as a bunch of fixes included here. Enjoy!
New rule: ignored-import
Category: imports
Use of explicit references (like data.user.roles
) that could instead point to an existing import will now be flagged in order to ensure that the imports a user has declared aren't ignored later in the policy.
For more information, see the docs on ignored-import.
Improvements
- The external-reference rule is now much better at detecting external references in function bodies.
- The rule-shadows-builtin now flags shadowed namespaces (like
http
) and not just shadowing of the full name (likehttp.send
) - The use-in-operator rule now also takes
=
into account (previous only==
would be checked for) - The unused-return-value rule was renamed unassigned-return-value to better reflect what the issue is
Bugs Fixed
- The
only-scalars
config option in prefer-value-in-head rule wasn't working — now it does! - Fix false positive in prefer-some-in-iteration
Changelog
- a2e8c46: Address
external-reference
missing cases (#570) (@anderseknert) - 4455680: docs: update path where version is saved to (#571) (@charlieegan3)
- e012e10: Fix broken
only-scalars
config inprefer-value-in-head
rule (#573) (@anderseknert) - ded8df1: Fix:
rule-shadows-builtin
to flag shadowed namespaces (#576) (@anderseknert) - 3f73ca5: Fix
prefer-some-in-iteration
false positive on contains check (#574) (@anderseknert) - 55b8fa7: Fix:
use-in-operator
should includeeq
(=
) in check (#575) (@anderseknert) - 3205762: Rule:
ignored-import
(#577) (@anderseknert) - 21a0dc4: Language server initialisation adjustments (#580) (@charlieegan3)
- c3d3fe0: Rename
unused-return-value
->unassigned-return-value
(#581) (@anderseknert) - b1a6fbe: OPA v0.62.0 (#583) (@anderseknert)