You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -12,67 +12,56 @@ What is Doxygen and why does |FOURC| rely on it?
12
12
13
13
Doxygen is a documentation generator, i.e. a tool for writing software reference documentation.
14
14
The documentation is written within the code, so documentation lives close by to the code that it is documenting.
15
-
This makes it relatively easy to keep up to date.
15
+
This makes it relatively easy to keep up-to-date.
16
16
Doxygen can cross reference documentation and code, so that the reader of a document can easily refer to the actual code.
17
17
18
+
In contrast to the high-level documentation you are currently reading, Doxygen generates the more technical
19
+
documentation of the code's API and relevant internals.
20
+
18
21
|FOURC|'s Policy
19
22
~~~~~~~~~~~~~~~~
20
23
21
-
|FOURC| requires a set of minimum Doxygen items for each code entity.
22
-
23
-
At a bare minimum, |FOURC| requires that
24
-
25
-
- any source code file has a file header consisting of the tags
26
-
- ``@file``
27
-
- ``@brief``
28
-
- ``@level``
29
-
- any newly added source code entity has a ``@brief`` description, and functions additionally require at least the ``@param`` and ``@return`` information.
24
+
|FOURC| requires Doxygen documentation for all new code.
30
25
31
26
It is the responsibility of the developer adding the new code to include the relevant documentation.
32
-
It is the responsibility of the merge request reviewer to not allow a request to be merged
33
-
until this minimum documentation is in place and is understandable to someone other than the author.
27
+
During code review, reviewers need to check that documentation is present and understandable.
34
28
35
29
It is also highly recommended and encouraged that any time you come across undocumented entities,
36
-
you either add the documentation yourself if you are knowledgeable enough to do so,
37
-
or contact the file author and ask them to add the documentation.
30
+
you take the time to document them. When you struggled to understand a piece of code,
31
+
you can be sure that the next developer will struggle too, so it can be a great opportunity to improve the code base.
32
+
Pull requests that "only" improve documentation of existing code are a welcome contribution!
38
33
Our goal is to have a fully documented code base, and the more proactive every developer is about that, the easier it will be to achieve.
39
34
40
-
> **Note:** Your IDE might offer supportive capabilities to ease Doxygen-style documentation.
41
-
Checkout the :ref:`IDE setup instructions <Set-up-your-ide>` for details.
42
-
43
35
Building the Doxygen Documentation
44
36
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45
37
46
38
Local build using CMake
47
39
"""""""""""""""""""""""""""
48
40
49
-
|FOURC| has defined a custom build target ``documentation`` (see also our :ref:`list of custom build targets <build4Cwithcustomtargets>`.
41
+
|FOURC| has defined a custom build target ``doxygen`` (see also our :ref:`list of custom build targets <build4Cwithcustomtargets>`.
50
42
In order to create the Doxygen HTML webpage locally, just issue the command
51
43
52
44
::
53
45
54
46
cd <buildDirectory>
55
-
make documentation
47
+
ninja doxygen
56
48
57
49
58
-
This will build the Doxygen documentation in the directory ``<buildDirectory>/doc/html/``.
59
-
It can be viewed by accessing ``<buildDirectory>/doc/html/index.html`` in any browser.
50
+
This will build the Doxygen documentation in the directory ``<buildDirectory>/doc/doxygen/html/``.
51
+
It can be viewed by accessing ``<buildDirectory>/doc/doxygen/html/index.html`` in any browser.
60
52
61
-
To trigger a *re-build* of the documentation, just call ``make documentation`` again.
62
-
The documentation target is always considered out of date and therefore always built.
63
-
It is unfortunately not possible to only rebuild the documentation for changed code.
64
-
However, Doxygen builds seem to benefit from using :ref:`ccache <ccache>`.
65
53
66
54
Pipeline build
67
55
""""""""""""""""
68
56
69
-
We have a Doxygen pipeline in place that creates the Doxygen documentation every night.
70
-
We check for errors in Latex processing. Other than that, no checks are performed right now.
57
+
The Doxygen documentation is also built when you submit a pull request. A merge to the main branch
58
+
will trigger the most recent version of the documentation to be built and published
0 commit comments