Skip to content
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

docs: Fix sphinx warnings listed in issue #9306 #9344

Merged
merged 1 commit into from
May 20, 2023

Conversation

btashton
Copy link
Contributor

@btashton btashton commented May 20, 2023

Summary

Fixes these errors:

 /home/bashton/nuttx-wrk/nuttx/Documentation/components/drivers/special/lcd.rst:52: WARNING: duplicate label ttgotdisplayesp32, other instance in /home/bashton/nuttx-wrk/nuttx/Documentation/components/drivers/special/framebuffer.rst
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:370: CRITICAL: Unexpected section title.
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:394: CRITICAL: Unexpected section title.
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:1494: ERROR: Inconsistent literal block quoting.
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:1569: WARNING: Literal block expected; none found.
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-kaluga-1/index.rst:207: WARNING: download file not readable: /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-kaluga-1/tone.wav
 checking consistency... /home/bashton/nuttx-wrk/nuttx/Documentation/reference/os/newreno.rst: WARNING: document isn't included in any toctree
 /home/bashton/nuttx-wrk/nuttx/Documentation/guides/zerolatencyinterrupts.rst:117: WARNING: unknown document: <nestedinterrupts.rst>

Testing

In master we see this build output

❯ make html
Removing everything under '_build'...
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 196 source files that are out of date
updating environment: [new config] 196 added, 0 changed, 0 removed
reading sources... [100%] reference/os/smp .. substitutions                                                                                   
waiting for workers...
/home/bashton/nuttx-wrk/nuttx/Documentation/components/drivers/special/lcd.rst:52: WARNING: duplicate label ttgotdisplayesp32, other instance in /home/bashton/nuttx-wrk/nuttx/Documentation/components/drivers/special/framebuffer.rst
/home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:370: CRITICAL: Unexpected section title.

Configuration
-------------
/home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:394: CRITICAL: Unexpected section title.

Usage
-----
/home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:1494: ERROR: Inconsistent literal block quoting.
/home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:1569: WARNING: Literal block expected; none found.
/home/bashton/nuttx-wrk/nuttx/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-kaluga-1/index.rst:207: WARNING: download file not readable: /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-kaluga-1/tone.wav
/home/bashton/nuttx-wrk/nuttx/Documentation/reference/user/structures.rst:111: WARNING: Duplicate C declaration, also defined at reference/user/07_signals:179.
Declaration is '.. c:struct:: sigaction'.
/home/bashton/nuttx-wrk/nuttx/Documentation/reference/user/structures.rst:111: WARNING: Duplicate C declaration, also defined at reference/user/07_signals:179.
Declaration is '.. c:function:: int sigaction(int signo, const struct sigaction *act, struct sigaction *oact);'.
looking for now-outdated files... none found
pickling environment... done
checking consistency... /home/bashton/nuttx-wrk/nuttx/Documentation/reference/os/newreno.rst: WARNING: document isn't included in any toctree
done
preparing documents... done
/home/bashton/nuttx-wrk/nuttx/Documentation/guides/zerolatencyinterrupts.rst:117: WARNING: unknown document: <nestedinterrupts.rst>           
writing output... [100%] reference/os/smp .. substitutions                                                                                    
waiting for workers...
generating indices... genindex done
writing additional pages... search done
copying images... [100%] _static/images/menuconfig-debug.png                                                                                  
copying downloadable files... [100%] platforms/xtensa/esp32s2/boards/esp32s2-saola-1/tone.wav                                                 
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 10 warnings.

The HTML pages are in _build/html.

With these changes we see

❯ make html
Removing everything under '_build'...
Running Sphinx v4.5.0
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 196 source files that are out of date
updating environment: [new config] 196 added, 0 changed, 0 removed
reading sources... [100%] reference/os/smp .. substitutions                                                                                   
waiting for workers...
/home/bashton/nuttx-wrk/nuttx/Documentation/reference/user/structures.rst:111: WARNING: Duplicate C declaration, also defined at reference/user/07_signals:179.
Declaration is '.. c:struct:: sigaction'.
/home/bashton/nuttx-wrk/nuttx/Documentation/reference/user/structures.rst:111: WARNING: Duplicate C declaration, also defined at reference/user/07_signals:179.
Declaration is '.. c:function:: int sigaction(int signo, const struct sigaction *act, struct sigaction *oact);'.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] reference/os/smp .. substitutions                                                                                    
waiting for workers...
generating indices... genindex done
writing additional pages... search done
copying images... [100%] _static/images/menuconfig-debug.png                                                                                  
copying downloadable files... [100%] platforms/xtensa/esp32s2/boards/esp32s2-saola-1/tone.wav                                                 
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 2 warnings.

The HTML pages are in _build/html.

WARNING: Duplicate C declaration, is expected and tracked as an upstream sphinx bug.

Fixes these errors:
```
 /home/bashton/nuttx-wrk/nuttx/Documentation/components/drivers/special/lcd.rst:52: WARNING: duplicate label ttgotdisplayesp32, other instance in /home/bashton/nuttx-wrk/nuttx/Documentation/components/drivers/special/framebuffer.rst
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:370: CRITICAL: Unexpected section title.
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:394: CRITICAL: Unexpected section title.
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:1494: ERROR: Inconsistent literal block quoting.
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/sim/sim/boards/sim/index.rst:1569: WARNING: Literal block expected; none found.
 /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-kaluga-1/index.rst:207: WARNING: download file not readable: /home/bashton/nuttx-wrk/nuttx/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-kaluga-1/tone.wav
 checking consistency... /home/bashton/nuttx-wrk/nuttx/Documentation/reference/os/newreno.rst: WARNING: document isn't included in any toctree
 /home/bashton/nuttx-wrk/nuttx/Documentation/guides/zerolatencyinterrupts.rst:117: WARNING: unknown document: <nestedinterrupts.rst>
```
@btashton btashton linked an issue May 20, 2023 that may be closed by this pull request
7 tasks
btashton referenced this pull request May 20, 2023
* Documentation/guides/nestedinterrupts.rst:
  New. Imported from [1] and converted from CWIKI to reStructuredText.

* Documentation/guides/index.rst:
  Link to the new page.

* Documentation/guides/zerolatencyinterrupts.rst:
  Replace link to the CWIKI Nested Interrupts page with link to the
  above.

[1] https://cwiki.apache.org/confluence/display/NUTTX/Nested+Interrupts
@xiaoxiang781216 xiaoxiang781216 merged commit 4d3ce8f into apache:master May 20, 2023
@xiaoxiang781216
Copy link
Contributor

@btashton could we enable the doc build warning to error? So, the similar thing can be caught before merging.

@btashton
Copy link
Contributor Author

@btashton could we enable the doc build warning to error? So, the similar thing can be caught before merging.

I would love to, but we cannot silence the Warning Duplicate declaration error for C, and that is caused by what this PR is trying to resolve. sphinx-doc/sphinx#8313 There are other projects that have added a plugin to regex whitelist warnings like this. We could build that as well if we wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: Sphinx warnings to be fixed up
2 participants