SwiftFormat

By Smita Jain |

SwiftFormat is a code library and command-line tool for reformatting Swift code on macOS, Linux, or Windows.

SwiftFormat extends 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.

Why you will like it:

  • It helps if you have a preferred style for formatting the code and others seem entirely blind to the existing formatting conventions of a project.
  • This tool allows you to concentrate on the code’s behavior, not on how it looks, since it automatically enforces a common style.