---
name: ocamlformat
description: "Use when adopting OCamlFormat to assess this standard: Format OCaml with a pinned profile"
---

# Apply OCamlFormat

Specify the formatter version in .ocamlformat and use the Dune formatting alias in CI. Review style changes separately when updating the formatter.

## Procedure

1. Inspect the repository configuration and identify the files or targets covered by OCamlFormat.
2. Use OCamlFormat in this repository to meet this standard: Format OCaml with a pinned profile. Specify the formatter version in .ocamlformat and use the Dune formatting alias in CI. Review style changes separately when updating the formatter. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.
3. Record the tool version, configuration, scope and findings. Explain any checks that could not run.
4. Use the same invocation after changes and compare the evidence against the baseline.

Refer to [the upstream documentation](https://ocaml.org/p/ocamlformat/) for configuration and prerequisites.

## Tool invocation

```
dune build @fmt
```
