-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: fix multiple Doxygen and breathe problems #33972
doc: fix multiple Doxygen and breathe problems #33972
Conversation
2bf59f9
to
46fcb51
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
API meeting 2021.04.06
|
This option prevents some structures to have missing pages on the Doxygen HTML output. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
`IEEE802154_MAX_ADDR_LENGTH` was defined in 2 headers, keep one only. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Predefine ATOMIC_DEFINE in the Doxyfile so that documentation output is generated correctly. In order to simplify the predefinition ATOMIC_BITMAP_SIZE has been introduced. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
warnings_filter is an extension that allows to filter out Sphinx warnings. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Replace current filter setup with the warnings_filter Sphinx extension. Note that current regexes have been simplified to make them more readable while keeping the most relevant information. Sphinx warnings are now treated as errors (-W). Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
46fcb51
to
36494d9
Compare
While testing #33448 I noticed that |
This PR introduced a way of filtering warnings that does not deal anymore with the output of Sphinx. What it does is to directly intercept Sphinx warning logs and filters them out (or converts them to |
Introduction
This PR is an attempt to fix multiple documentation problems we have when using Doxygen + Breathe.
Summary of the changes
INLINE_SIMPLE_STRUCTS
Doxygen option. Some struct pages were missing in the Doxygen output (e.g. check https://docs.zephyrproject.org/apidoc/latest/group__bt__gatt__client.html)ieee802154
headers. While valid C code, as of today Sphinx C domain/breathe do not support duplicate definitions. In this case I think the duplicate was likely unintentional.ATOMIC_DEFINE
inside a struct (see https://docs.zephyrproject.org/apidoc/latest/structbt__gatt__subscribe__params.html). Refactored this part.Remaining issues
The remaining issues should be fixed by sphinx-doc/sphinx#8313. TLDR; as of today you can't have something like:
After Sphinx fixes the problem above we should be able to (hopefully) get rid of the current "known issues".
zephyr.warnings_filter
extensionInstead of post-processing Sphinx output, I have created a small extension that natively filters out Sphinx warnings. This Sphinx plugin can be used to filter out warnings that are known to be false positives. The warnings are filtered out based on a set of regular expressions given via a configuration file, the same principle as before.
At the same time I have simplified current regular expressions and moved them to
doc/known-warnings.txt
with the idea to make docs more self-contained.