mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Update util/check-categories.sh for logging-categories.rst and call from CI
This commit is contained in:
@@ -396,6 +396,7 @@ misc:
|
||||
- xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
|
||||
- xmllint --noout --nonet --html `git ls-files '*.html'`
|
||||
- sh util/check-win32util-configure
|
||||
- sh util/check-categories.sh
|
||||
needs: []
|
||||
artifacts:
|
||||
paths:
|
||||
|
@@ -7,12 +7,21 @@
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
list1=`grep LOGCATEGORY lib/*/include/*/*.h bin/named/include/named/*.h |
|
||||
grep "#define.*(&" |
|
||||
sed -e 's/.*LOGCATEGORY_\([A-Z_]*\).*/\1/' -e 's/^RRL$/rate-limit/' |
|
||||
tr '[A-Z]' '[a-z]' |
|
||||
tr _ - | sed 's/^tat$/trust-anchor-telemetry/' | sort -u`
|
||||
list2=`sed -n 's;.*<para><command>\(.*\)</command></para>;\1;p' doc/arm/logging-categories.xml | tr '[A-Z]' '[a-z]' | sort -u`
|
||||
list1=$(
|
||||
grep LOGCATEGORY lib/*/include/*/*.h bin/named/include/named/*.h |
|
||||
grep "#define.*(&" |
|
||||
sed -e 's/.*LOGCATEGORY_\([A-Z_]*\).*/\1/' -e 's/^RRL$/rate-limit/' |
|
||||
tr '[A-Z]' '[a-z]' |
|
||||
tr _ - |
|
||||
sed 's/^tat$/trust-anchor-telemetry/' |
|
||||
sort -u
|
||||
)
|
||||
list2=$(
|
||||
awk '$1 == "|" && $3 == "|" && $NF == "|" && $2 ~ /^``.*``$/ { print $2 }' doc/arm/logging-categories.rst |
|
||||
sed 's/``//g' |
|
||||
sort -u
|
||||
)
|
||||
status=0
|
||||
for i in $list1
|
||||
do
|
||||
ok=no
|
||||
@@ -26,6 +35,7 @@ do
|
||||
if test $ok = no
|
||||
then
|
||||
echo "$i missing from documentation."
|
||||
status=1
|
||||
fi
|
||||
done
|
||||
for i in $list2
|
||||
@@ -41,5 +51,7 @@ do
|
||||
if test $ok = no
|
||||
then
|
||||
echo "$i not in code."
|
||||
status=1
|
||||
fi
|
||||
done
|
||||
exit $status
|
||||
|
Reference in New Issue
Block a user