aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2023-05-08 21:14:56 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2023-05-08 21:14:56 +0300
commit3109effe7297232e17c1792e63c3a9c7d129a4eb (patch)
tree416e627518960ae39f4af332380df81ff4e62c99 /scripts
parenta893baa9dcd8d28d0c45d3230cbbcbea9a8abcd9 (diff)
downloadkmi-3109effe7297232e17c1792e63c3a9c7d129a4eb.tar.gz
kmi-3109effe7297232e17c1792e63c3a9c7d129a4eb.zip
improve undocumented file warning
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/warn-undocumented11
1 files changed, 6 insertions, 5 deletions
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