34

Cocoapods provides two lint commands, spec lint and lib lint. What's the exact different between them, and in what scenario are they each used?

I read the documentation (spec, lib), but I can not find the difference between them, and I do not understand why Cocoapods provides two command for the same thing.

0

1 Answer 1

59

TL;DR: pod lib lint = local, pod spec lint = local/remote


You mentioned that you had read the docs but it's still unclear. I'll try to make it more clear :

pod lib lint

It will lint your pod locally, and will just assume that you provided everything properly to create your pod (it won't make any attempts to fetch/download its dependencies). But it will not be enough to validate your pod, Only pod spec lint will.

pod spec lint

It will lint your pod anywhere. You can have your pod source code on GitHub. The lint command would just work. If the pod spec lint returns without errors, you can push the linted pod up to Cocoapods.

2
  • 2
    Is that mean pod spec lint covers all tests of pod lib lint? And pod spec lint tests the pod more strict?
    – Quanlong
    Sep 1, 2015 at 12:44
  • 1
    Yes, pod spec lint IS the ultimate way to test your pod spec against your library. I used pod lib lint before pushing my code on github, but now I use only pod spec lint, you should too
    – Loegic
    Sep 1, 2015 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.