Merge pull request #363 from def-/https-git
Use secure https instead of insecure git protocol
This commit is contained in:
commit
c669bfe2e3
2 changed files with 168 additions and 163 deletions
|
|
@ -10,6 +10,7 @@
|
|||
# * Missing tags
|
||||
# * Missing description
|
||||
# * Missing/unknown license
|
||||
# * Insecure git:// url on GitHub
|
||||
#
|
||||
# Usage: nim c -d:ssl -r package_scanner.nim
|
||||
#
|
||||
|
|
@ -101,7 +102,7 @@ proc check(): int =
|
|||
echo "E: ", name, " has no URL"
|
||||
result.inc()
|
||||
|
||||
elif not canFetchNimbleRepository(name, pdata["web"]):
|
||||
elif pdata.hasKey("web") and not canFetchNimbleRepository(name, pdata["web"]):
|
||||
result.inc()
|
||||
|
||||
elif not pdata.hasKey("tags"):
|
||||
|
|
@ -116,6 +117,10 @@ proc check(): int =
|
|||
echo "E: ", name, " has no license"
|
||||
result.inc()
|
||||
|
||||
elif pdata["url"].str.normalize.startsWith("git://github.com/"):
|
||||
echo "E: ", name, " has an insecure git:// URL instead of https://"
|
||||
result.inc()
|
||||
|
||||
else:
|
||||
# Other warnings should go here
|
||||
if not (pdata["license"].str in LICENSES):
|
||||
|
|
|
|||
324
packages.json
324
packages.json
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue