From 9db5e76d0f5d2aafc0cd1c7fb689dfb66dcee414 Mon Sep 17 00:00:00 2001 From: Patitotective Date: Tue, 18 Oct 2022 07:10:34 -0500 Subject: [PATCH] Check for empty tags (#2385) --- package_scanner.nim | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package_scanner.nim b/package_scanner.nim index b1bcf7d..fccf531 100644 --- a/package_scanner.nim +++ b/package_scanner.nim @@ -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