`swift-format` roadmap?

Is there a publicly available swift-format roadmap?

swift-format semantic linting rules are quite basic at the moment. Are there long or mid-term plans to add more features to it? I'm now looking at the lack of this one: "warn on having default in switches instead of explicit cases" (or to put it differently "prefer @unknown defaults to a bare defaults") but there are many others. Or is the main focus of swift-format formatting, and for anything that involves deeper semantic linting I should be better looking for an alternative?

1 Like

Anything that requires semantic information is out of scope for swift-format, since it only has access to the parsed syntax tree and no information about the types involved. So your example of "prefer @unknown default to bare default" would need to know whether the value being switched over is specifically a non-exhaustive enum, which we can't get at.

2 Likes

Hi, thanks for taking this up…

the question above ‘Are there long or mid-term plans to add more features to it?’ is not yet answered. May I ask for it?

1 Like