You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package play
import rego.v1
split_rule_name :=split(input.rulePackageNameToRun, ".")
result := data.play.other[a][b][c][d] if [a, b, c, d] := split_rule_name
result := data.play.other[a][b][c] if [a, b, c] := split_rule_name
result := data.play.other[a][b] if [a, b] := split_rule_name
result := data.play.other[a] if [a] := split_rule_name
other.foo.bar :="baz"
As @srenatus pointed out on Slack, this policy, while a tad unconventional, has Regal falsely report both top-level-iteration and pointless-reassignment. I guess we should file two issues for this, but the cause is likely the same for both, so I'll split these up only if it's found not to be the case.
Boiling it down, this should work as a test case:
package play
import rego.v1
parts :=split(input.parts, ".")
result := ref[a][b] if [a, b] := parts
The text was updated successfully, but these errors were encountered:
As @srenatus pointed out on Slack, this policy, while a tad unconventional, has Regal falsely report both top-level-iteration and pointless-reassignment. I guess we should file two issues for this, but the cause is likely the same for both, so I'll split these up only if it's found not to be the case.
Boiling it down, this should work as a test case:
The text was updated successfully, but these errors were encountered: