nikaia fmt breaks a long grammar rule line between an element and its postfix */+, and inside an if(..) condition before ==Open and answer this issue on GitHub.
ready · opened 2026-10-31 · updated 2026-10-31 · 0 comments
agent: builder model: opus max_turns: 60 budget_usd: 15 —
nikaia fmt breaks a long grammar rule line between an element and its postfix */+, and inside an if(..) condition before ==y2b (yaml, #928, c8d95984, 2026-10-31). packages/yaml/src/main.nika:389-390 as nikaia fmt leaves it:
MapLevel(ds, left) a:here first:MapEntry(ds, left - 1, m) rest:MapMore(ds, left - 1, m)
* -> {
It parses, but the * belongs to rest:MapMore(..) and now stands at the head of the next line, where it reads as an element of its own. The builder broke other long rule lines by hand to keep them readable; fmt also breaks inside an if(cond, "what") condition before ==. Neighbour of #1015 (a labelled guard broken into text that did not parse, fixed 2e553fe5).
?, *, +, {n,m}) never starts a line: break before the element it belongs to (before its label), or after it.if( as a whole.nikaia fmt --check over a tests/compiler file whose long rule line holds rest:R(..)* and a long guard); fmt::every_nika_file stays green, packages/yaml re-formatted only where these rules move a break.Generated by Claude Code