Check for empty tags (#2385)

This commit is contained in:
Patitotective 2022-10-18 07:10:34 -05:00 committed by GitHub
parent 2baaac6094
commit 9db5e76d0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@
# * Missing/unknown method
# * Missing/unreachable repository
# * Missing tags
# * Empty tags
# * Missing description
# * Missing/unknown license
# * Insecure git:// url on GitHub
@ -166,6 +167,14 @@ proc check(): int =
inc result
elif pkg.hasKey("web") and not canFetchNimbleRepository(name, pkg["web"]):
echo "W: Failed to fetch source code repo for ", name
elif pkg.hasKey("tags"):
var emptyTags = 0
for tag in pkg["tags"]:
if tag.getStr.len == 0:
inc emptyTags
if emptyTags > 0:
echo "W: ", name, " has ", emptyTags, " empty tags"
if name.normalize notin names:
names.incl name.normalize