buildkit/FromAsCasing¶
The AS and FROM keywords' casing should match.
| Property | Value |
|---|---|
| Severity | Warning |
| Category | Style |
| Default | Enabled |
| Auto-fix | Yes (--fix) |
Description¶
While Dockerfile keywords can be either uppercase or lowercase, mixing case
styles is not recommended for readability. This rule reports violations where
mixed case style occurs for a FROM instruction with an AS keyword declaring
a stage name.
Examples¶
Bad:
FROM is uppercase but as is lowercase.
Good:
Both keywords use the same casing.
Auto-fix¶
The fix changes the AS keyword casing to match the FROM keyword.