Open a terminal.
In the terminal, drag and drop the red frame after cd and paste it. Then remove the last/and subsequent/and press Enter.
cd /Users/sakamototatsuya/Desktop/swift/SwiftLintTestApp
Then enter:
pod init
Now that you have a podfile, open it below.
open podfile
Since the podfile can be opened, add SwiftLint as shown in the red frame.
pod 'SwiftLint'
Save with comand + s and close. Return to the terminal and enter:
pod install
If it looks like the image, you have installed it.
Close the Xcode you just opened and open it in workspace.
Operate in the order of the numbers.
Press + and select New Run Script Phase
.
Then, Run Script will be added below.
Enter the following code in the red frame.
"${PODS_ROOT}/SwiftLint/swiftlint"
If you get a lot of warnings, I think it's working.
https://github.com/realm/SwiftLint
Recommended Posts