Swiftlint: How to use SwiftLint in my own pod

Created on 26 Feb 2018  路  10Comments  路  Source: realm/SwiftLint

How can I configure swiftlint to check my pod with files in _Development Pods_ folder?

I have created my CocoaPod with the example below and I have an Example project as well.
pod lib create MyLibrary

question

Most helpful comment

@nahlam You should put the .swiftlint.yml in the root of the Example folder. Then you must configure it so that only look for warnings in your development pod:

excluded:
  - Pods

included:
  - ../DevelopmentPodName

All 10 comments

Have you tried following the instructions on README?

off course @marcelofabri. I麓m able to run swiftlint in my Example project and validate my example code but not the actual pod files in the _Development Pods folder_.

@davnag since Pods are isolated projects/components, I would recommend to lint those projects separately, not as part of your project.

Development Pods are in a parent folder IIRC. You need to update your run script to go to that folder first.

Closing this due to lack of activity.

If anybody figured this out, I'd love to know how it was done.

I'm also having problem with that.

"I'm able to run swiftlint in my Example project and validate my example code but not the actual pod files in the Development Pods folder."

@moppymopperson, @ricardohochman, @davnag

Have now managed to resolve this, as per @marcelofabri mentions you need to change the run script directory first.

e.g

screen shot 2018-08-09 at 15 58 03

It still doesn't see the .swiftlint.yml file
where should i put it?

@nahlam You should put the .swiftlint.yml in the root of the Example folder. Then you must configure it so that only look for warnings in your development pod:

excluded:
  - Pods

included:
  - ../DevelopmentPodName
Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrtj picture mrtj  路  3Comments

bourquep picture bourquep  路  3Comments

ivanbruel picture ivanbruel  路  3Comments

ziryanov picture ziryanov  路  3Comments

larslockefeer picture larslockefeer  路  3Comments