Skip to content

Duplicate Condition Branches (ARCH9190)

Key swift.quality.duplicate-condition-branches · Severity warning · Category quality

Flags if / else or switch branches whose bodies are identical. @unknown default is required on a non-frozen enum and cannot be merged into a case.

if a { save() } else { save() }
save()

Merge the branches or fix the condition that was meant to differ.