Skip to content

False positive in use-some-for-output-vars when var in ref head ref #1489

@anderseknert

Description

@anderseknert
rule[arr[i]] contains value if {
    arr := [1, 2, 3]

    some i
    value := input.foo[i]
}

This currently reports i in the ref head as not being declared using some, while clearly it was. This seems to have something to do with the var being used in a nested ref, as rule[i] works as expected. Interestingly, making that change will instead have Regal correctly report input.foo[i] as a use-some-in-iteration violation... and that's somehow masked by i being in a nested ref. So two bugs really, but possibly related, so we'll see if there's a need for a separate issue for that later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ruleIssues related to new or existing linter rules

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions