]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add script to check doxygen formatting
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 24 Jan 2014 23:18:58 +0000 (23:18 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 24 Jan 2014 23:18:58 +0000 (23:18 +0000)
git-svn-id: https://svn.dealii.org/trunk@32307 0785d39b-7218-0410-832d-ea1e28bc413d

tests/scripts/checkdoxygen.py [new file with mode: 0755]

diff --git a/tests/scripts/checkdoxygen.py b/tests/scripts/checkdoxygen.py
new file mode 100755 (executable)
index 0000000..3bcd7f5
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+
+# run this script on all headers of deal.II to check that
+# all doxygen groups have matching @{ @} pairs.
+# for example:
+# find include -name "*h" -print | xargs -n 1 ../tests/scripts/checkdoxygen.py
+
+import sys
+
+args=sys.argv
+args.pop(0)
+
+f = open(args[0])
+lines = f.readlines()
+f.close()
+
+
+count = 0
+lineno = 1
+for l in lines:
+    if "@{" in l:
+            count = count + 1
+    elif "@}" in l:
+             count = count -1
+             if (count < 0):
+                 sys.exit("Error in file '%s' in line %d"%(args[0],lineno));
+    lineno = lineno + 1
+
+if (count != 0):
+    sys.exit("Error: missing closing braces in file '%s'"%(args[0]));

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.