[swift-evolution] Support for coding styles and "swift-format" tool
mardani29 at yahoo.es
Mon May 16 16:42:24 CDT 2016
As Swift is getting traction in more and more platforms outside of
Apple, we can expect that many coding styles different from what Apple
imposes with SourceKit's indenting rules will emerge. According to
https://bugs.swift.org/browse/SR-146, we now have decoupled indenting
logic from SourceKit into its own library, and a "swift-format" tool is
in the making.
I am working on adding support for different coding styles to libIDE.
For example, with my changes you could decide how a case label should be
indented with respect to its parent switch context, among other things.
The current, hard coded indenting decisions in libIDE could be named the
"Apple" style, just like Clang supports Google, LLVM, Mozilla, coding
styles for C++. Also, this is something that can be supported by
external tools like Xcode quite easily.
Do you think this is a good feature to have?
More information about the swift-evolution