swift-format

Formatting technology for Swift source code

brewmacoslinux
Try with needOr install directly
Source

About

Formatting technology for Swift source code

Commands

swift-format

Examples

Format a single Swift file in place$ swift-format -i myfile.swift
Check formatting of all Swift files in a directory$ swift-format --lint .
Format and print to stdout without modifying files$ swift-format myfile.swift