---
title: "lint/control-flow/no-switch-continue"
pagination: false
---

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

<RuleId id="lint/control-flow/no-switch-continue" />

In the [`modernize`](/docs/rules/sets/modernize) set. Safe fix.

## What it does

Switch case must not be ended with `continue` but with `break`.

## Configuration

```toml title="pun.toml"
[lint.rules]
"control-flow/no-switch-continue" = "error"
```

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

## Replaces

- [`switch_continue_to_break`](https://cs.symfony.com/doc/rules/control_structure/switch_continue_to_break.html) (php-cs-fixer)
- [`switch-continue-to-break`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#switch-continue-to-break) (mago-linter)

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