Skip to content

Language formatter semantics — findings (2026)

Language formatter semantics — findings (2026)

Section titled “Language formatter semantics — findings (2026)”

Identify whether formatting can:

  • Shift line/column spans expected by diagnostics or golden tests
  • Reject programs that still parse pre-format
  • Hide issues by pretty-printing invalid constructs into valid-looking shapes (unlikely but worth guarding)
  • reference/cli.md documents vox fmt behavior and failure modes — treat CLI prose as user-facing canon pending deeper audit.
  • LSP formatting is often delegated or partial relative to CLI — parity risk documented in vox-lsp-capabilities-ssot-2026.md.
  1. Span instability: Multi-edit workflows (IDE format-on-save + compiler) may reorder diagnostics if spans are not byte-stable.
  2. Second parser gate: Fail-closed fmt encourages treating the printer as part of developer workflow — needs explicit policy vs vox check.
  1. Add tests: format → re-parse → identical AST snapshot for golden files subset.
  2. Document explicit policy in vox-diagnostic-ux-ssot-2026.md: whether fmt is required before CI merge.