Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule: duplicate-annotation #1126

Open
anderseknert opened this issue Sep 23, 2024 · 0 comments
Open

Rule: duplicate-annotation #1126

anderseknert opened this issue Sep 23, 2024 · 0 comments

Comments

@anderseknert
Copy link
Member

I didn't know this worked until now, but it does:

# METADATA
# title: foo

# METADATA
# title: bar
rule := true

rego.metadata.rule() will simply return the last metadata block annotations, while chain() will give you all of them. I don't think it makes any sense to have duplicate, potentially "conflicting" annotations on the same scope, like in the example above. We should of course still allow the same attributes to descripe different scopes though (e.g. one description for document and one for rule).

Not sure about the category, but I would think this is likely a mistake, so leaniing towards bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant