[Libreoffice] Script to find undocumented classes

Miklos Vajna vmiklos at frugalware.org
Tue Nov 30 04:31:33 PST 2010


Hi,

I'm attaching a patch that adds a script to the scratch directory of a
build repo that tries to find undocumented classes using doxygen. It's
meant to be invoked in a subdirectory of the source code, so in case one
is familiar with Calc, she can run it under sc/ and add doxygen comments
to the classes she know, etc.

I'm intentionally not using 'make docs', because the target here is to
allow quick iteration, ie. to run 'find-undocumented-classes.sh -q' in a
subdirectory, add a few comments, run again, etc.

Does the idea sounds sane, OK to push?

Thanks.
-------------- next part --------------
From 0fd0d400e3a64cb9619a207868c835d18acce162 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos at frugalware.org>
Date: Mon, 22 Nov 2010 14:33:57 +0100
Subject: [PATCH] Add script to find undocumented classes

---
 scratch/find-undocumented-classes.sh |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100755 scratch/find-undocumented-classes.sh

diff --git a/scratch/find-undocumented-classes.sh b/scratch/find-undocumented-classes.sh
new file mode 100755
index 0000000..58a133b
--- /dev/null
+++ b/scratch/find-undocumented-classes.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# finds undocumented classes in the current directory (recursive)
+
+filter=
+quiet=n
+if [ "$1" = "-q" ]; then
+    filter=">/dev/null"
+    quiet=y
+fi
+
+doxygen=$(mktemp -d)
+eval doxygen -g $doxygen/doxygen.cfg $filter
+sed -i "/HTML_OUTPUT/s|html|$doxygen/html|" $doxygen/doxygen.cfg
+sed -i '/GENERATE_LATEX/s/= YES/= NO/' $doxygen/doxygen.cfg
+sed -i '/RECURSIVE/s/= NO/= YES/' $doxygen/doxygen.cfg
+eval doxygen $doxygen/doxygen.cfg $filter 2> $doxygen/errors.txt
+if [ "$quiet" == "n" ]; then
+    echo
+    echo "The following classes are undocumented:"
+    echo
+fi
+cat $doxygen/errors.txt|grep 'Warning: Compound.*is not documented'
+rm -rf $doxygen
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
-- 
1.7.3.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20101130/d615032f/attachment.pgp>


More information about the LibreOffice mailing list