StyraInc / regal

Regal is a linter for Rego, with the goal of making your Rego magnificent!

Home Page:https://docs.styra.com/regal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scaffolding command for new built-in and custom rules

anderseknert opened this issue · comments

Something like:

regal new rule --type custom --category naming --title lower-case

Which would:

  1. Create a .regal directory if none exists.
  2. Create a .regal/rules directory if none exists.
  3. Create a .regal/rules/category/title.rego file pre-populated with the basic required policy structure.
  4. Create a .regal/rules/category/title_test.rego file pre-populated with the basic required policy test structure.

And something similar to the above for creating new built-in rules as well, where the new files are added to the Regal bundle instead, and where there's also an entry added for documentation in the docs directory.