Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Build the Doxygen reference in CI and fail on warnings

The Doxyfile had never run in CI, and its warnings went to a log file.

- It reads the headers only (*.hpp): Doxygen cannot match the explicit
  specializations of StringMaker and the PImpl constructors defined in the
  sources to their declarations, which gave ten of its twelve warnings.
- src/Progmasoft/Catch3/Internal/Preprocessor.hpp is left out: Doxygen reads
  priority_tag<N> deriving from priority_tag<N - 1> as a recursive class.
- WARN_AS_ERROR = FAIL_ON_WARNINGS, warnings on standard error.
- DOT_GRAPH_MAX_NODES = 200, so the include graph of All.hpp (103 nodes)
  is drawn; DOT_MULTI_TARGETS, which Doxygen 1.18 no longer knows, is gone.
- .github/workflows/doxygen.yml installs Doxygen and Graphviz, builds the
  reference and keeps the HTML.

Claude-Session: https://claude.ai/code/session_01Ji7xZMYjc4zankoc7hGBE1
Commit
b3c841b539755e12b706bf6d78f333b20747062c
Author
Leitwolf11 ·
Parents
8979c1caf2ee

Files · Download .tar.gz

Changes

 .github/workflows/doxygen.yml | 43 +++++++++++++++++++++++++++++++++++++++++++
 Doxyfile                      | 28 +++++-----------------------
 2 files changed, 48 insertions(+), 23 deletions(-)

diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml
new file mode 100644
index 00000000..d724d8c2
--- /dev/null
+++ b/.github/workflows/doxygen.yml
@@ -0,0 +1,43 @@
+name: Doxygen
+
+# The reference of the Progmasoft headers under src/Progmasoft, with the
+# include graphs. Every warning fails it.
+
+on:
+  push:
+    branches: [devel]
+  pull_request:
+
+permissions:
+  contents: read
+
+concurrency:
+  group: doxygen-${{ github.ref }}
+  cancel-in-progress: true
+
+jobs:
+  doxygen:
+    name: Doxygen
+    runs-on: ubuntu-26.04
+    timeout-minutes: 15
+    steps:
+      - name: Checkout source code
+        uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
+        with:
+          persist-credentials: false
+
+      - name: Install Doxygen and Graphviz
+        run: |
+          sudo apt-get update
+          sudo apt-get install --yes --no-install-recommends doxygen graphviz
+
+      - name: Build the reference
+        run: doxygen Doxyfile
+
+      - name: Keep the reference
+        uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
+        with:
+          name: catch3-doxygen
+          path: docs/doxygen/html/
+          if-no-files-found: error
+          retention-days: 7
diff --git a/Doxyfile b/Doxyfile
index 12d4bb3c..1b2461f9 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -892,7 +892,7 @@ WARN_IF_UNDOC_ENUM_VAL = NO
 # Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT.
 # The default value is: NO.
 
-WARN_AS_ERROR          = NO
+WARN_AS_ERROR          = FAIL_ON_WARNINGS
 
 # The WARN_FORMAT tag determines the format of the warning messages that doxygen
 # can produce. The string should contain the $file, $line, and $text tags, which
@@ -922,7 +922,7 @@ WARN_LINE_FORMAT       = "at line $line of file $file"
 # specified the warning and error messages are written to standard output
 # (stdout).
 
-WARN_LOGFILE           = doxygen.errors
+WARN_LOGFILE           =
 
 #---------------------------------------------------------------------------
 # Configuration options related to the input files
@@ -974,17 +974,7 @@ INPUT_FILE_ENCODING    =
 # provided as doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
 # *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.
 
-FILE_PATTERNS          = *.c \
-                         *.cpp \
-                         *.ipp \
-                         *.h \
-                         *.hpp \
-                         *.inc \
-                         *.m \
-                         *.md \
-                         *.dox \
-                         *.ucf \
-                         *.ice
+FILE_PATTERNS          = *.hpp
 
 # The RECURSIVE tag can be used to specify whether or not subdirectories should
 # be searched for input files as well.
@@ -999,7 +989,7 @@ RECURSIVE              = YES
 # Note that relative paths are relative to the directory from which doxygen is
 # run.
 
-EXCLUDE                =
+EXCLUDE                = src/Progmasoft/Catch3/Internal/Preprocessor.hpp
 
 # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
 # directories that are symbolic links (a Unix file system feature) are excluded
@@ -2757,7 +2747,7 @@ PLANTUML_INCLUDE_PATH  =
 # Minimum value: 0, maximum value: 10000, default value: 50.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
-DOT_GRAPH_MAX_NODES    = 100
+DOT_GRAPH_MAX_NODES    = 200
 
 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
 # generated by dot. A depth value of 3 means that only nodes reachable from the
@@ -2771,14 +2761,6 @@ DOT_GRAPH_MAX_NODES    = 100
 
 MAX_DOT_GRAPH_DEPTH    = 0
 
-# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10) support
-# this, this feature is disabled by default.
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_MULTI_TARGETS      = YES
 
 # If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
 # explaining the meaning of the various boxes and arrows in the dot generated