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 doesn't validate type of summary and description #220

Closed
kylef opened this issue Feb 19, 2015 · 2 comments
Closed

Linter doesn't validate type of summary and description #220

kylef opened this issue Feb 19, 2015 · 2 comments
Assignees

Comments

@kylef
Copy link
Contributor

kylef commented Feb 19, 2015

I'd expect the following changes would fix the problem, but for some reason don't work. Looks like the type checking may be broken.

diff --git a/lib/cocoapods-core/specification/dsl.rb b/lib/cocoapods-core/specification/dsl.rb
index d6e398e..89fed94 100644
--- a/lib/cocoapods-core/specification/dsl.rb
+++ b/lib/cocoapods-core/specification/dsl.rb
@@ -301,6 +301,7 @@ module Pod
       #           A short description of the Pod.
       #
       root_attribute :summary,
+                     :types => String,
                      :required => true

       #------------------#
@@ -322,7 +323,8 @@ module Pod
       #   @param  [String] description
       #           A longer description of the Pod.
       #
-      root_attribute :description
+      root_attribute :description,
+                     :types => String

       #------------------#

@@ -362,7 +364,8 @@ module Pod
       #   @param  [String] documentation_url
       #           The link of the web documentation of the Pod.
       #
-      root_attribute :documentation_url
+      root_attribute :documentation_url,
+                     :types => String

       #------------------#

@@ -776,7 +779,8 @@ module Pod
       #           The path to the prefix header file.
       #
       attribute :prefix_header_file,
-                :inherited => true
+                :inherited => true,
+                :types => String

       #------------------#

From CocoaPods/CocoaPods#3134

@segiddins
Copy link
Member

String is the default type, but I'm working on a fix -- only question: should this happen on validation or when creating the Specification from the DSL, or both?

@segiddins segiddins self-assigned this Feb 19, 2015
@segiddins
Copy link
Member

I'm working on moving the existing (unused) attribute validation logic into the linter.

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

No branches or pull requests

2 participants