Format Rego
rego_formatFormats Rego source code with OPA fmt, returns formatted code and a changed flag, and warns about known formatting bugs in specific OPA versions.
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. |