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: directory-package-mismatch #1024

Merged
merged 1 commit into from
Aug 29, 2024
Merged

Rule: directory-package-mismatch #1024

merged 1 commit into from
Aug 29, 2024

Commits on Aug 29, 2024

  1. Rule: directory-package-mismatch

    Time to ruffle some feathers! Or move to the `custom` category, I
    haven't decided yet 😆 Either way, while this rule can certainly
    feel disruptive, larger policy projects *should* have a uniform
    structure.
    
    Some notes on the implementation:
    - Does not complain if a single file is provided, i.e. when there
      is no path except for the file. So `regal lint p.rego` will not
      result in a violation.
    - Allows `_test` packages to either reside in the same directory
      as the package they test (this is the default) or to be kept in
      a separate directory matching the package exactly (optional).
    
    Other than the rule implementation itself, this naturally required
    that we we restructured all of our own directories to follow this
    convention. I wasn't too sure about it at first, but the result
    definitely seems both clean and correct, so I think we're right about
    this. Also helped correct a few typos in names!
    
    Fixes #1007
    
    Signed-off-by: Anders Eknert <[email protected]>
    anderseknert committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    5cc9f70 View commit details
    Browse the repository at this point in the history