|
3 | 3 | By default, Regal will lint your policies using the |
4 | 4 | [capabilities](https://www.openpolicyagent.org/docs/deployments/#capabilities) of the latest version of OPA |
5 | 5 | known to Regal (i.e. the latest version of OPA at the time Regal was released). Sometimes you might want to tell Regal |
6 | | -that some rules aren't applicable to your project (yet!). As an example, if you're running OPA v0.46.0, you likely won't |
7 | | -be helped by the |
8 | | -[custom-has-key](https://openpolicyagent.org/projects/regal/rules/idiomatic/custom-has-key-construct) |
9 | | -rule, as it suggests using the `object.keys` built-in function introduced in OPA |
10 | | -v0.47.0. The opposite could also be true — |
11 | | -sometimes new versions of OPA will invalidate rules that applied to older versions. An example of this is the upcoming |
12 | | -introduction of `import rego.v1`, which will make |
13 | | -[implicit-future-keywords](https://openpolicyagent.org/projects/regal/rules/imports/implicit-future-keywords) |
14 | | -obsolete, as importing |
15 | | -`rego.v1` automatically imports all "future" functions. |
| 6 | +that some rules aren't applicable to your project (yet!). For example, recommending the use of the |
| 7 | +[strings.count](https://www.openpolicyagent.org/projects/regal/rules/idiomatic/use-strings-count) function doesn't make |
| 8 | +much sense for users who for some reason are targeting a version of OPA before v0.67.0, as that's when that function was |
| 9 | +introduced. |
| 10 | + |
| 11 | +The opposite could also be true — new versions of OPA sometimes invalidate rules that were relevant in the past. For |
| 12 | +example, having Regal check for |
| 13 | +[implicit future keyword](https://www.openpolicyagent.org/projects/regal/rules/imports/implicit-future-keywords) imports |
| 14 | +makes no sense post OPA 1.0, as importing "future" keywords are no longer needed. |
16 | 15 |
|
17 | 16 | Capabilities help you tell Regal which features to take into account, and rules with dependencies to capabilities |
18 | 17 | not available or not applicable in the given version will be skipped. |
|
0 commit comments