Format Rego
rego_formatFormats Rego source code via opa fmt, returns canonical formatting and a changed flag, and warns about a known OPA bug affecting string interpolation.
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. |