| Property | Value |
|---|---|
| Severity | Style |
| Category | Style |
| Default | Enabled |
| Auto-fix | Yes (safe) |
Description
Trailing whitespace (spaces and tabs at the end of lines) is invisible noise that clutters diffs in version control. This rule detects and can automatically remove trailing whitespace from all lines in a Dockerfile.Examples
Bad
· = space, → = tab)
Good
Configuration
Default (no config needed):Options
| Option | Type | Default | Description |
|---|---|---|---|
skip-blank-lines | boolean | false | Skip lines that are entirely whitespace |
ignore-comments | boolean | false | Skip any line starting with # (Dockerfile comments and # lines inside heredoc bodies) |