[Bug 1521] Use custom doxygen run to log all errors in doxygen.warnings.report.sh
authorPeter D. Barnes, Jr. <barnes26@llnl.gov>
Wed, 07 Nov 2012 13:21:37 -0800
changeset 9123 a2c0863500a9
parent 9122 257f931d13e1
child 9124 4ee743993c0a
[Bug 1521] Use custom doxygen run to log all errors in doxygen.warnings.report.sh
doc/doxygen.warnings.report.sh
--- a/doc/doxygen.warnings.report.sh	Wed Nov 07 12:58:29 2012 -0800
+++ b/doc/doxygen.warnings.report.sh	Wed Nov 07 13:21:37 2012 -0800
@@ -2,17 +2,42 @@
 
 # Process doxygen.warnings.log to generate sorted list of top offenders
 
-logfile=doxygen.warnings.log
-rootdir=`dirname $PWD`
+DIR=`dirname $0`
+ROOT=`hg root`
+
+# First, we have to modify doxygen.conf to generate all the warnings
+# (We also suppress dot graphs, so shorten the run time.)
+
+conf=$DIR/doxygen.conf
+
+sed -i.bak -E '/^EXTRACT_ALL |^HAVE_DOT /s/YES/no/' $conf
+rm -f $conf.bak
+
+echo -n "Rebuilding doxygen docs with full errors..."
+(cd $ROOT && ./waf --doxygen >/dev/null 2>&1)
+status=$?
+
+hg revert $conf
+
+if [ "$status" = "0" ]; then
+    echo "Done."
+else
+    echo "FAILED."
+    exit 1
+fi
+
+# Now we're ready to summarize the log
+
+logfile=$DIR/doxygen.warnings.log
 
 echo
 echo "Summary Report of Doxygen warnings:"
 echo
 echo "Count of warning by module:"
 echo "Count Module"
-grep "^$rootdir" $logfile  | \
+grep "^$ROOT" $logfile  | \
     cut -d ':' -f 1 | \
-    sed "s|$rootdir||g" | \
+    sed "s|$ROOT||g" | \
     cut -d '/' -f 1-3 | \
     sort | \
     uniq -c | \
@@ -21,7 +46,7 @@
 echo 
 
 undocparam=` \
-grep -v "^$rootdir" $logfile | \
+grep -v "^$ROOT" $logfile | \
     grep -v "not generated, too many nodes" | \
     grep "^  parameter '" $logfile | \
     wc -l | \