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

# powershell/PSAvoidLongLines

> Avoid long lines

`powershell/PSAvoidLongLines` is a PSScriptAnalyzer diagnostic emitted by tally for PowerShell snippets embedded in Dockerfiles.

| Property | Value            |
| -------- | ---------------- |
| Severity | Warning          |
| Category | PSScriptAnalyzer |
| Auto-fix | No               |

## Description

The length of lines, including leading spaces (indentation), should be less than the configured
number of characters. The default length is 120 characters.

<Note>
  This rule isn't enabled by default. The user needs to enable it through settings.
</Note>

## Configuration

```powershell theme={null}
Rules = @{
    PSAvoidLongLines  = @{
        Enable     = $true
        MaximumLineLength = 120
    }
}
```

## Parameters

### `Enable`: bool (Default value is `$false`)

Enable or disable the rule during ScriptAnalyzer invocation.

### `MaximumLineLength`: int (Default value is 120)

Optional parameter to override the default maximum line length.

## Source

This rule documentation is adapted from Microsoft's PSScriptAnalyzer documentation for
[AvoidLongLines](https://github.com/MicrosoftDocs/PowerShell-Docs-Modules/blob/main/reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidLongLines.md),
licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
