Overview
Warn when using .frame(alignment: .top) without specifying width or height.
Rule Identifier
frame_alignment_requires_dimensions
Rationale
Frame alignment has no effect without dimensions - likely a mistake.
Example
// ❌ Warning - alignment has no effect
Text("Hello")
.frame(alignment: .top)
// ✅ Correct - alignment works with dimension
Text("Hello")
.frame(maxHeight: .infinity, alignment: .top)
Priority
Low - straightforward detection, prevents common mistake
Overview
Warn when using
.frame(alignment: .top)without specifying width or height.Rule Identifier
frame_alignment_requires_dimensionsRationale
Frame alignment has no effect without dimensions - likely a mistake.
Example
Priority
Low - straightforward detection, prevents common mistake