[libsoup/pgriffis/ci-test] ci: Add checks for documentation issues




commit ccdcdaea95d654b4d060d097b95a4f2cfcc18cde
Author: Patrick Griffis <pgriffis igalia com>
Date:   Fri Oct 30 15:38:33 2020 -0500

    ci: Add checks for documentation issues

 .gitlab-ci.yml           |  5 +++++
 .gitlab-ci/check-docs.py | 23 +++++++++++++++++++++++
 2 files changed, 28 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1e09c998..1468ccd7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -61,6 +61,11 @@ reference:
     paths:
       - _reference
 
+reference:2:
+  stage: docs
+  script:
+    - .gitlab-ci/check-docs.py
+
 pages:
   stage: deploy
   needs: ['reference']
diff --git a/.gitlab-ci/check-docs.py b/.gitlab-ci/check-docs.py
new file mode 100755
index 00000000..ecd91e2f
--- /dev/null
+++ b/.gitlab-ci/check-docs.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+
+import sys
+
+with open('_build/docs/reference/libsoup-3.0-unused.txt') as f:
+    unused_docs = f.read()
+
+if unused_docs:
+    print('There is documentation not listed in libsoup-3.0-sections.txt:')
+    print(unused_docs)
+    sys.exit(1)
+
+with open('_build/docs/reference/libsoup-3.0-undocumented.txt') as f:
+    # The file starts with a summary
+    # undocumented_summary = ''.join(f.readline() for i in range(6)).strip()
+    for i in range(5):
+        f.readline()
+    undocumented_list = f.read().strip()
+
+if undocumented_list:
+    print('There is missing documentation:')
+    print(undocumented_list)
+    sys.exit(1)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]