opa fmt unnecessarily expands a one-liner if condition into a block (if { ... }) when the rule head's value expression spans multiple lines, even though the condition itself is a single simple term.
Steps To Reproduce
format this:
foo := sprintf(
"%d",
1,
) if allow
and get this
foo := sprintf(
"%d",
1,
) if {
allow
}
Expected behavior
remain as
foo := sprintf(
"%d",
1,
) if allow
opa fmtunnecessarily expands a one-linerifcondition into a block (if { ... }) when the rule head's value expression spans multiple lines, even though the condition itself is a single simple term.Steps To Reproduce
format this:
and get this
Expected behavior
remain as