From 3109effe7297232e17c1792e63c3a9c7d129a4eb Mon Sep 17 00:00:00 2001 From: Kimplul Date: Mon, 8 May 2023 21:14:56 +0300 Subject: improve undocumented file warning --- Makefile | 3 ++- scripts/warn-undocumented | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index e3fe55e..56e7254 100644 --- a/Makefile +++ b/Makefile @@ -109,7 +109,8 @@ license: .PHONY: docs docs: - ./scripts/warn-undocumented + find arch lib common include -iname '*.[ch]' -not -path */gen/* |\ + xargs ./scripts/warn-undocumented doxygen docs/doxygen.conf # bmake didn't seem to have the -f flag on by default diff --git a/scripts/warn-undocumented b/scripts/warn-undocumented index 8cb46c8..aa7d0f7 100755 --- a/scripts/warn-undocumented +++ b/scripts/warn-undocumented @@ -1,6 +1,7 @@ #!/bin/sh -# look through all files for either @file or \file, grep -c will report -# ./example.file:0 if it is not found. -find arch lib common include -iname '*.[ch]' -not -path */gen/* -exec \ - grep -c '[@\]file' {} \+ \ - | awk -F':' '$2 == 0 {print "Undocumented file:", $1}' +# look through all files for either @file or \file +for file in $@ +do + grep -c '[@\]file' "$file" |\ + awk -F':' "\$1 == 0 {print \"Undocumented file: $file\"}" +done -- cgit v1.3