> ## 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/PSAvoidTrailingWhitespace

> Avoid trailing whitespace

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

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

## Description

Lines should not end with whitespace characters. This can cause problems with the line-continuation
backtick, and also clutters up future commits to source control.

This diagnostic can coexist with [`tally/no-trailing-spaces`](/rules/tally/no-trailing-spaces):
PSScriptAnalyzer reports trailing whitespace in PowerShell snippets, while tally checks the
Dockerfile as a whole. If both rules suggest the same edit, tally applies it once.

## Source

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