SwiftFormat
A command-line tool and Xcode Extension for formatting Swift code
SwiftFormat is a code library and command-line tool for reformatting Swift code on macOS or Linux. SwiftFormat goes above and beyond what you might expect from a code formatter. In addition to adjusting white space, it can insert or remove implicit self, remove redundant parentheses, and correct many other deviations from the standard Swift idioms. Many programmers have a preferred style for formatting their code, and others seem entirely blind to the existing formatting conventions of a project. When collaborating on a project, it can be helpful to agree on a common coding style, but enforcing that manually is tedious and error-prone, and can lead to arguments if some participants take it more seriously than others. Having a tool to automatically enforce a common style eliminates those issues, and lets you focus on the behavior of the code, not its presentation.