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: messy-rule
#672
Labels
Comments
anderseknert
added a commit
that referenced
this issue
May 13, 2024
Help identify incremental rule definitions that aren't grouped together. Fixes #672 Signed-off-by: Anders Eknert <anders@styra.com>
anderseknert
added a commit
that referenced
this issue
May 13, 2024
Help identify incremental rule definitions that aren't grouped together. Also fix two violations against this rule that we had in our own codebase. Fixes #672 Signed-off-by: Anders Eknert <anders@styra.com>
Merged
anderseknert
added a commit
that referenced
this issue
May 13, 2024
Help identify incremental rule definitions that aren't grouped together. Also fix two violations against this rule that we had in our own codebase. Fixes #672 Signed-off-by: Anders Eknert <anders@styra.com>
anderseknert
added a commit
that referenced
this issue
May 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While working on support for document symbols, one of the open questions was how to best represent Rego's incremental rule definitions for a format that largely expects location ranges for identification. @charlieegan3 suggested a rule to enforce that incremental rules and function definitions are grouped together in a package. So something like this would be discouraged:
In favor of:
Looking at the Regal code base, we're violating this frequently ourselves 😅 And since it "doesn't matter" it's easy to forget about without tooling to help enforce this. Needless to say, this would be a
style
category rule, or possibly evencustom
if we think this should be optional. But as the document symbols feature showed us, even style can have a real-world impact.The text was updated successfully, but these errors were encountered: