Swiftlint: Running swiftlint autocorrect via CocoaPods managed installation.

Created on 12 Oct 2018  路  2Comments  路  Source: realm/SwiftLint

Hello,
as I am concerned it is fairly easy to use swiftlint autocorrect when I install my _Swiftlint_ with Homebrew, I used it, and it works fine.

I would just like to know, is it possible to use above mentioned autocorrect when _Swiftlint_ is installed via Cocoapods?

Thank You for Your time,
have a nice day 馃

Most helpful comment

If you run swiftlint autocorrect in a build phase, the steps are pretty much the same. You just have to run SwiftLint as "${PODS_ROOT}/SwiftLint/swiftlint" instead of swiftlint in your build phase (see here).

But if you run it manually, from the command line:

$ swiftlint autocorrect

then you'll have to run it as:

$ ./Pods/SwiftLint/swiftlint autocorrect

When installed via CocoaPods, swiftlint resides in Pods/SwiftLint/.

All 2 comments

If you run swiftlint autocorrect in a build phase, the steps are pretty much the same. You just have to run SwiftLint as "${PODS_ROOT}/SwiftLint/swiftlint" instead of swiftlint in your build phase (see here).

But if you run it manually, from the command line:

$ swiftlint autocorrect

then you'll have to run it as:

$ ./Pods/SwiftLint/swiftlint autocorrect

When installed via CocoaPods, swiftlint resides in Pods/SwiftLint/.

Ok, that's pretty cleared, I thought that would not work so easily, could've checked that twice. Thank You, I am closing the issue :)

Was this page helpful?
0 / 5 - 0 ratings