Make doc-check fail the build on warnings
[alexxy/gromacs.git] / docs / doxygen / doxygen-check.py
index 50a7727d29a6b745916a82facfe8d4c7509ac2cf..db560720cc9109ece6239376730aa7376f80c7f0 100755 (executable)
@@ -354,6 +354,8 @@ def main():
                       help='Issue notes for comments ignored by Doxygen')
     parser.add_option('-q', '--quiet', action='store_true',
                       help='Do not write status messages')
+    parser.add_option('--exitcode', action='store_true',
+                      help='Return non-zero exit code if there are warnings')
     options, args = parser.parse_args()
 
     installedlist = []
@@ -401,4 +403,7 @@ def main():
     reporter.report_unused_filters()
     reporter.close_log()
 
+    if options.exitcode and reporter.had_warnings():
+        sys.exit(1)
+
 main()