---
title: "format/control-flow/empty-loop-body"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="format/control-flow/empty-loop-body" />

Not in any preset. Safe fix.

## What it does

Empty loop-body must be in configured style.

## Configuration

```toml title="pun.toml"
[format.rules]
"control-flow/empty-loop-body" = true
```

To skip it in some files, add a [`@pun-ignore-file`](/docs/configuration/ignore-comments) comment.

## Options

| Name | Type | Allowed values | Default | Upstream name |
| --- | --- | --- | --- | --- |
| `style` | `enum` | `braces`, `semicolon` | `"semicolon"` | `style` |

## Replaces

- [`empty_loop_body`](https://cs.symfony.com/doc/rules/control_structure/empty_loop_body.html) (php-cs-fixer)

[More format/control-flow rules](/docs/rules/format/control-flow) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
