8bitzz/blogs

Setup SwiftLint for iOS project

Opened this issue · 0 comments

Reference: SwiftLint Github

Installation

Using CocoaPods:

Simply add the following line to your Podfile:

pod 'SwiftLint'

Usage

  1. Click the Project in the file navigator

  2. Click the primary app target

  1. Go to Build Phases

  2. Click the + button and select "New Run Script Phase"

  1. Insert the following as the script

  1. Move your SwiftLint phase directly before 'Compile Sources' step, to detect errors quickly before compiling

That's all for this blog. Happy coding :]