This repository contains the configuration file of Swiftlint that is based on Deloitte Digital's Swift Style Guide.
Install Swiftlint first by following the steps in Swiftlint
Recommend using Homebrew to install Swiftlint.
- Add this
.swiftlint.yml
file under your project root directory - Rename the project under
included:
in the.swiftlint.yml
file. - Add "New Run Script Phase", following the instructions in Swiftlint
- Build your project, then it will scan and detect the code that doesn't comply with Swift Guide rules, and show warning or error messages
- Create a new your own branch from master branch
- Add your custom rules or modification in
.swiftlint.yml
file - Write code test for your modification or updates
- Commit and Push your changes
- Create a Pull Request
You can find all you need about Swiftlint on this official Github page Swiftlint, e.g How to define custom rules in Swiftlint, and how to use .swiftlint.yml configuration file