You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is of course only my opinion, but after just adopting swift-format it feels like there are a lot of configuration options. In comparison, other successful formatting tools like gofmt or Python's black have taken the approach to offer no or very little configuration options to avoid divergence in style and discussions in teams about formatting details.
Ideally, swift-format would produce the same result for every equivalent AST (though there can be pragmatic exemptions from this rule). However, adapting the default configuration today with "respectsExistingLineBreaks": true does not produce this strict result and using "respectsExistingLineBreaks": false can collapse code in unexpected ways.
Defining and documenting the reasons for the default style, which usually are opitimizing diffs and readability, have helped for me to conciliate myself with the strict rules imposed by other formatters.
So starting a discussion about how a strict formatting style could look like would be useful to ease the adoption of swift-format.
The text was updated successfully, but these errors were encountered:
This is of course only my opinion, but after just adopting swift-format it feels like there are a lot of configuration options. In comparison, other successful formatting tools like gofmt or Python's black have taken the approach to offer no or very little configuration options to avoid divergence in style and discussions in teams about formatting details.
Ideally, swift-format would produce the same result for every equivalent AST (though there can be pragmatic exemptions from this rule). However, adapting the default configuration today with
"respectsExistingLineBreaks": true
does not produce this strict result and using"respectsExistingLineBreaks": false
can collapse code in unexpected ways.Defining and documenting the reasons for the default style, which usually are opitimizing diffs and readability, have helped for me to conciliate myself with the strict rules imposed by other formatters.
So starting a discussion about how a strict formatting style could look like would be useful to ease the adoption of swift-format.
The text was updated successfully, but these errors were encountered: