Exercise 2: Ending Style Arguments With a Linter — Possible Solution ==================================================================== TASK Say which tool addresses the argument, how you would install and wire it into an Xcode project, and what you would do before the automatic fix. ANSWER Tool: SwiftLint, which enforces Swift style and conventions and has over 200 rules covering naming, structure and style. INSTALL brew install swiftlint (The repository also lists Swift Package Manager, CocoaPods, a pre-built package and Docker.) WIRE IT IN The repository describes two routes for Xcode: a build tool plugin (described as recommended for modern projects) or a Run Script build phase. On an Apple silicon Mac with Homebrew you may need /opt/homebrew/bin on your PATH. CONFIGURE Put the team's agreed rules in .swiftlint.yml using disabled_rules, opt_in_rules or only_rules. BEFORE swiftlint --fix It edits your files, so commit or stash your work first and read the diff afterwards. CAUTION I did not verify individual rule names against the current list, so pick them from SwiftLint's own rules page.