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

pod spec lint gives unclear error message when https://www.github.com/repo/project.git format is given for source URL #2029

Closed
ikai opened this issue Apr 10, 2014 · 8 comments
Assignees

Comments

@ikai
Copy link

ikai commented Apr 10, 2014

Repro steps:

  1. Set the pod spec's source to: = { :git => "https://www.github.com/YOUR-REPO/YOUR-SPEC.git", :tag => "YOUR_TAG" }
  2. Run pod lib lint

Expected: a warning that "www" prefix is not required
Observed: This error message:

- WARN  | Github repositories should use `https` link.

This could probably be a bit more clear.

@neonichu
Copy link
Member

I think that shouldn't give a warning at all.

@ikai
Copy link
Author

ikai commented Apr 10, 2014

If you browse to a github repo using https and the www prefix, GitHub will forward you to the correct URL sans prefix. I think it is okay to be strict here because this is a one second fix for a developer. The tool should just be clear about the expected format.

@neonichu
Copy link
Member

@alloy any opinion on this?

@alloy
Copy link
Member

alloy commented Apr 12, 2014

I think that in this case it makes sense to also lint the use of a subdomain on GitHub, unless there are other valid subdomains, such as gist that would then require additional handling.

@neonichu
Copy link
Member

There's already a special case for gist.github.com, I would propose to just extended that.

BTW, I can't actually reproduce the OP's warning with CocoaPods 0.31.1

@neonichu
Copy link
Member

Seems to me that the current behaviour is actually that www.github.com will not be treated as a GitHub URL and the checks for GH will be skipped.

https://github.com/CocoaPods/Core/blob/master/lib/cocoapods-core/specification/linter.rb#L317

I would propose to extend this with www.github.com - @alloy?

@alloy
Copy link
Member

alloy commented Apr 13, 2014

@neonichu I think that link is no longer correct, but looking at perform_github_source_checks it should indeed need to be changed. Maybe we should just disallow this after all, it makes everything simpler and saves a redirect to boot.

@neonichu
Copy link
Member

Fixed the link. Will tackle this so that www.github.com will be disallowed with an appropriate error message.

@neonichu neonichu self-assigned this Apr 13, 2014
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants