> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# loop-copy-accumulator

> A loop copies its growing result on every iteration.

## What it flags

Copying a growing result or allocating a filtered array for a boolean test.

## How to review or fix

Consider a private accumulator or a short-circuiting predicate. A loop over a literal list can receive contextual advice when its fresh, immediately seeded accumulator and every appended item have a proven small bound.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "loop-copy-accumulator": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.