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