SwiftLint icon indicating copy to clipboard operation
SwiftLint copied to clipboard

Rule Request: multiline_operator_position

Open iliaskarim opened this issue 4 months ago • 0 comments

New Issue Checklist

Feature or Enhancement Proposal

Rule Name

multiline_operator_position

Description

Ensures that operators in multiline expressions are placed at the beginning of the next line.

Motivation

This formatting style enhances readability by clearly distinguishing operators from operands in complex expressions.

Example

// Before:
let result = a + b +
             c + d

// After:
let result =
    a + b +
    c + d

Alternatives Considered

Currently, this formatting is manually enforced or handled by custom rules.

iliaskarim avatar Sep 07 '25 18:09 iliaskarim