---
title: "lint/style/require-fopen-flag-order"
pagination: false
---

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

<RuleId id="lint/style/require-fopen-flag-order" />

Not in any set. Unsafe fix: it can change behaviour.

## What it does

Order the flags in `fopen` calls, `b` and `t` must be last.

## Configuration

```toml title="pun.toml"
[lint.rules]
"style/require-fopen-flag-order" = "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

- [`fopen_flag_order`](https://cs.symfony.com/doc/rules/function_notation/fopen_flag_order.html) (php-cs-fixer, risky)

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