leogdion / PackageListValidator

A tool for validating the SwiftPM Library/Swift Package Index master package list.
MIT License
1 stars 0 forks source link

Should All Urls Use the Same Scheme or Protocol? #8

Open leogdion opened 4 years ago

leogdion commented 4 years ago

We already validate that the .git extension exists. Should we verify that all urls use https for consistancy?

https://github.com/SwiftPackageIndex/PackageListValidator/blob/bf65a428b828cb7b169a231f6d5cf6ad6438349d/Sources/PackageListValidator/Controllers/GitUrlListValidator.swift#L8

daveverwer commented 4 years ago

I guess technically http or https would both be valid, even though http is almost never going to happen.

But yes, let's validate that it's not a git:// link by saying it has to be http/https.

leogdion commented 4 years ago

I would pick http or https because allowing both would allow for duplicates technically.

daveverwer commented 4 years ago

I think the risk of http/https duplicates is very slim, and it's no worse than it currently is without that validation. I'd rather err on the side of allowing both http and https, and risk the very slim chance of a duplicate.

daveverwer commented 4 years ago

I think this is resolved? Should we close it?

leogdion commented 4 years ago

No it's not. It's still on my todo list :)