Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linter] Check PodSpecs for unknown keys #88

Closed
fabiopelosin opened this issue Apr 3, 2014 · 4 comments · Fixed by #94
Closed

[Linter] Check PodSpecs for unknown keys #88

fabiopelosin opened this issue Apr 3, 2014 · 4 comments · Fixed by #94

Comments

@fabiopelosin
Copy link
Member

As PodSpecs can by loaded by JSON or YAML files it would be useful to highlight any non supported key.

This should be implemented in a dedicated method in https://github.com/CocoaPods/Core/blob/master/lib/cocoapods-core/specification/linter/analyzer.rb#L6. The implementation could check the Pod::Specification#attributes_hashagainst the Pod::Specification::DSL.attributes. Each attribute agains the Pod::Specification::DSL::Attribute#name which is used as a key for the hash storing them

@alloy
Copy link
Member

alloy commented Apr 3, 2014

YES! Can we get this ASAP? (For trunk.)

@fabiopelosin
Copy link
Member Author

This should also check for the type (the class) of values stored for each attribute.

@orta
Copy link
Member

orta commented Apr 4, 2014

I wonder if we should allow a _ prefix that allows people to have spec metadata but only for plugin authors to work with?

@fabiopelosin
Copy link
Member Author

@orta sounds like a good idea, but I would prefer a specific need to arise before implementing it.

Ashton-W pushed a commit to Ashton-W/Core that referenced this issue Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants