---
title: "lint/style/no-array-accumulation-in-loop"
pagination: false
---

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

<RuleId id="lint/style/no-array-accumulation-in-loop" />

In the [`coding-style`](/docs/rules/sets/coding-style) set. Report only.

## What it does

Detects O(n²) array accumulation patterns inside loops.

## Configuration

```toml title="pun.toml"
[lint.rules]
"style/no-array-accumulation-in-loop" = "error"
```

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

## Replaces

- [`no-array-accumulation-in-loop`](https://mago.carthage.software/1.61.0/en/tools/linter/rules/#no-array-accumulation-in-loop) (mago-linter)

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