chore(quality): ocamlformat config + fatal warnings in dev #6

Merged
toph merged 2 commits from chore/ocaml-quality-gate into main 2026-06-29 13:32:58 +00:00
Owner

Adds the two cheapest quality gates for the OCaml tree.

What

  1. .ocamlformat — pins the formatter (default profile, v0.29.0). ocamlformat was already in the devshell but a no-op without this file. dune fmt now formats/checks the tree.
  2. Root dune env stanza — -w +a -warn-error +a in the dev profile, so unused vars, non-exhaustive matches, and shadowing become hard build errors. The release profile stays lenient so a stray warning never blocks a build. A few noisy warnings are disabled (4 fragile-match, 40/42/44/45 constructor/label disambiguation, 70 missing-mli — the last lifts when the .mli slice lands).

Commits

  • config + flags (small, the reviewable part)
  • mechanical dune fmt reformat of the existing tree (no behavior change)

Verified

  • dune build @all clean under -warn-error +a — no pre-existing warnings
  • dune fmt clean
  • dune test — 52 tests pass

Follow-up slice planned: .mli interfaces for core modules (num, geom, ast).

Adds the two cheapest quality gates for the OCaml tree. ## What 1. `.ocamlformat` — pins the formatter (`default` profile, v0.29.0). `ocamlformat` was already in the devshell but a no-op without this file. `dune fmt` now formats/checks the tree. 2. Root `dune` `env` stanza — `-w +a -warn-error +a` in the **dev** profile, so unused vars, non-exhaustive matches, and shadowing become hard build errors. The **release** profile stays lenient so a stray warning never blocks a build. A few noisy warnings are disabled (4 fragile-match, 40/42/44/45 constructor/label disambiguation, 70 missing-mli — the last lifts when the `.mli` slice lands). ## Commits - config + flags (small, the reviewable part) - mechanical `dune fmt` reformat of the existing tree (no behavior change) ## Verified - `dune build @all` clean under `-warn-error +a` — no pre-existing warnings - `dune fmt` clean - `dune test` — 52 tests pass Follow-up slice planned: `.mli` interfaces for core modules (`num`, `geom`, `ast`).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- .ocamlformat pins formatter (default profile, v0.29.0)
- root dune env stanza: -warn-error +a in dev, lenient in release

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mechanical reformat under the new .ocamlformat config. No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
toph force-pushed chore/ocaml-quality-gate from 9fb9ebc309 to 1ca68ab9dd 2026-06-29 13:10:51 +00:00 Compare
toph merged commit d54a43b623 into main 2026-06-29 13:32:58 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
toph/beloch!6
No description provided.