[Linter] check frameworks attribute for invalid frameworks #66

kylef opened this Issue Mar 21, 2014 · 10 comments

3 participants


As seen in Marxon13/Specs@8ca38c4

  • frameworks
  • weak_frameworks
  • libraries

A simple regex rule for detecting invalid names, such as with , and spaces etc.

@kylef kylef added the enhancement label Mar 21, 2014
@kylef kylef referenced this issue in CocoaPods/Specs Mar 21, 2014

Fixed error in pod spec #9489

@fabiopelosin fabiopelosin changed the title from Linter should check frameworks for invalid frameworks to [Linter] check frameworks attribute for invalid frameworks Mar 31, 2014
CocoaPods member

This issue can be implemented by improving this two methods to check against a regex.


I would love to have a go at this, but I'm struggling to find the spec where these methods are tested. Can anyone point me in the right direction?

CocoaPods member

Hi @squarefrog... great to hear that!

The specs are here (by convention we name the test file like TESTED_CLASS_spec.rb and use the the same tree of the lib/cocoapods-core dir in the spec dir).


Thanks! I'll start on this tomorrow. I'll just add a simple regex to look for any non-alphanumeric. If this needs to change down the line (support symbols?), it should be easy to add new rules.

CocoaPods member

Sounds great!


Couldn't sleep ;)



Strikethroughs are strings filtered out by the validation.

CocoaPods member

@squarefrog in case any is missing... the tests of your patch should include all the cases that you presented above in #66 (comment)


Sure I can do that. Is there a way to check for passing cases? For example:

  it 'checks that acceptable frameworks do not raise messages' do
    @spec.frameworks = %w(MyLibrary Mylib2)
    message_should_not_include('framework', 'name')

I know message_should_not_include does not exist but is there something similar.

CocoaPods member

You can create any function that would helpful as showcased in this spec


OK I'll see what I can come up with this weekend!

@fabiopelosin fabiopelosin closed this in #96 Apr 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment