Skip to content

Commit

Permalink
Check for empty tags (nim-lang#2385)
Browse files Browse the repository at this point in the history
  • Loading branch information
Patitotective authored Oct 18, 2022
1 parent 2baaac6 commit 9db5e76
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions package_scanner.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# * Missing/unknown method
# * Missing/unreachable repository
# * Missing tags
# * Empty tags
# * Missing description
# * Missing/unknown license
# * Insecure git:// url on GitHub
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9db5e76

Please sign in to comment.