Format Rego
rego_formatFormat Rego source code using opa fmt. Returns the formatted source and a changed flag indicating if input was already canonical.
Instructions
Format Rego source code using opa fmt. Returns the formatted source and a changed flag indicating whether the input was already canonical. When the source uses string interpolation ($"..." or $... syntax) and OPA v1.12.0 or v1.12.1 is detected, the tool warns about or blocks formatting due to a known OPA bug that corrupts { escape sequences (fixed in OPA v1.12.2).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Rego source code to format. |