11# Regal
22
33[ ![ Build Status] ( https://github.com/styrainc/regal/workflows/Build/badge.svg?branch=main )] ( https://github.com/styrainc/regal/actions )
4- ![ OPA v1.3.0 ] ( https://openpolicyagent.org/badge/v1.3.0 )
4+ ![ OPA v1.4.2 ] ( https://openpolicyagent.org/badge/v1.4.2 )
55[ ![ codecov] ( https://codecov.io/github/StyraInc/regal/graph/badge.svg?token=EQK01YF3X3 )] ( https://codecov.io/github/StyraInc/regal )
66[ ![ Downloads] ( https://img.shields.io/github/downloads/styrainc/regal/total.svg )] ( https://github.com/StyraInc/regal/releases )
77
@@ -22,14 +22,6 @@ development, whether you're an experienced Rego developer or just starting out.
2222
2323\- [ Merriam Webster] ( https://www.merriam-webster.com/dictionary/regal )
2424
25- ## ** New!** Regal and OPA 1.0+
26-
27- OPA 1.0 was [ recently released] ( https://blog.openpolicyagent.org/announcing-opa-1-0-a-new-standard-for-policy-as-code-a6d8427ee828 ) ,
28- and starting from version v0.30.0, Regal supports working with both OPA 1.0+ policies and Rego from earlier versions
29- of OPA. While everything should work without additional configuration, we recommend checking out our documentation on
30- using Regal with [ OPA 1.0] ( https://docs.styra.com/regal/opa-one-dot-zero ) and later for the best possible experience
31- managing projects of any given Rego version, or even a mix of them.
32-
3325## Goals
3426
3527- Deliver an outstanding policy development experience by providing the best possible tools for that purpose
@@ -459,7 +451,7 @@ It's also possible to ignore messages on a per-file basis. The available methods
459451- [Ignoring Files Globally](#ignoring-files-globally) or
460452 [Ignoring a Rule in Some Files](#ignoring-a-rule-in-some-files).
461453
462- # ## Ignoring a Rule In Config
454+ # ## Ignoring a Rule in Config
463455
464456If you want to ignore a rule, set its level to `ignore` in the configuration file :
465457
@@ -471,7 +463,7 @@ rules:
471463 level: ignore
472464` ` `
473465
474- # ## Ignoring a Category In Config
466+ # ## Ignoring a Category in Config
475467
476468If you want to ignore a category of rules, set its default level to `ignore` in the configuration file :
477469
@@ -482,7 +474,7 @@ rules:
482474 level: ignore
483475` ` `
484476
485- # ## Ignoring All Rules In Config
477+ # ## Ignoring All Rules in Config
486478
487479If you want to ignore all rules, set the default level to `ignore` in the configuration file :
488480
@@ -757,20 +749,12 @@ are:
757749
758750# # OPA Check and Strict Mode
759751
760- Linting with Regal assumes syntactically correct Rego. If there are errors parsing any files during linting, the
761- process is aborted and any parser errors are logged similarly to OPA. OPA itself provides a "linter" of sorts,
762- via the `opa check` command and its `--strict` flag. This checks the provided Rego files not only for syntax errors,
763- but also for OPA [strict mode](https://www.openpolicyagent.org/docs/latest/policy-language/#strict-mode) violations.
764-
765- > **Note** It is recommended to run `opa check --strict` as part of your policy build process, and address any violations
766- > reported there before running Regal. Why both commands? Couldn't the strict mode checks be integrated in Regal?
767- > That would certainly be an option. However, most of the strict mode checks will be made default / mandatory as part
768- > of a future OPA 1.0 release, at which point they'd be made immediately obsolete as part of Regal. There are a few
769- > strict mode checks that likely will remain optional in OPA, and we may choose to integrate them into Regal in the
770- > future.
771- >
772- > Until then, the recommendation is to run both `opa check --strict` and `regal lint` as part of your policy build
773- > and test process.
752+ OPA itself provides a "linter" of sorts, via the `opa check` command and its `--strict` flag. This checks the provided
753+ Rego files not only for syntax errors, but also for OPA
754+ [strict mode](https://www.openpolicyagent.org/docs/latest/policy-language/#strict-mode) violations. Most of the strict
755+ mode checks from before OPA 1.0 have now been made default checks in OPA, and only two additional checks are currently
756+ provided by the `--strict` flag. Those are both important checks not covered by Regal though, so our recommendation is
757+ to run `opa check --strict` against your policies before linting with Regal.
774758
775759# # Regal Language Server
776760
@@ -814,6 +798,14 @@ for an extensive overview of all features, and their meaning.
814798
815799See the [Editor Support](/docs/editor-support.md) page for information about Regal support in different editors.
816800
801+ # # Regal and OPA 1.0+
802+
803+ Starting from version v0.30.0, Regal supports working with both
804+ [OPA 1.0+]((https://blog.openpolicyagent.org/announcing-opa-1-0-a-new-standard-for-policy-as-code-a6d8427ee828))
805+ policies and Rego from earlier versions of OPA. While everything should work without additional configuration,
806+ we recommend checking out our documentation on using Regal with [OPA 1.0](https://docs.styra.com/regal/opa-one-dot-zero)
807+ and later for the best possible experience managing projects of any given Rego version, or even a mix of them.
808+
817809# # Resources
818810
819811# ## Documentation
0 commit comments