8bitzz / blogs

0 stars 0 forks source link

Setup SwiftLint for iOS project #34

Open 8bitzz opened 2 years ago

8bitzz commented 2 years ago

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 :]