---
name: zig-fmt
description: "Use when adopting zig fmt to assess this standard: Verify canonical Zig formatting"
---

# Apply zig fmt

Use the formatter shipped with the project's compiler. Check the source tree in CI so contributors and automation agree on layout.

## Procedure

1. Inspect the repository configuration and identify the files or targets covered by zig fmt.
2. Use zig fmt in this repository to meet this standard: Verify canonical Zig formatting. Use the formatter shipped with the project's compiler. Check the source tree in CI so contributors and automation agree on layout. 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://ziglang.org/learn/overview/) for configuration and prerequisites.

## Tool invocation

```
zig fmt --check .
```
