diff mbox series

[v3,01/12] docs/cpu-hotplug.rst: Fix rST markup issues

Message ID 20190305172139.32662-2-peter.maydell@linaro.org
State Superseded
Headers show
Series Enable build and install of our rST docs | expand

Commit Message

Peter Maydell March 5, 2019, 5:21 p.m. UTC
sphinx-build complains:

docs/cpu-hotplug.rst:67: ERROR: Unexpected indentation.
docs/cpu-hotplug.rst:69: ERROR: Unexpected indentation.
docs/cpu-hotplug.rst:74: WARNING: Block quote ends without a blank line; unexpected unindent.
docs/cpu-hotplug.rst:75: WARNING: Block quote ends without a blank line; unexpected unindent.
docs/cpu-hotplug.rst:76: SEVERE: Unexpected section title.

}
{
docs/cpu-hotplug.rst:78: WARNING: Block quote ends without a blank line; unexpected unindent.

These are the result of not indicating one of the literal
blocks by finishing the preceding paragraph with the "::" marker.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Acked-by: Aleksandar Markovic <amarkovic@wavecomp.com>

Message-id: 20190228145624.24885-2-peter.maydell@linaro.org
---
 docs/cpu-hotplug.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.20.1

Comments

Richard Henderson March 5, 2019, 10:34 p.m. UTC | #1
On 3/5/19 9:21 AM, Peter Maydell wrote:
> sphinx-build complains:

> 

> docs/cpu-hotplug.rst:67: ERROR: Unexpected indentation.

> docs/cpu-hotplug.rst:69: ERROR: Unexpected indentation.

> docs/cpu-hotplug.rst:74: WARNING: Block quote ends without a blank line; unexpected unindent.

> docs/cpu-hotplug.rst:75: WARNING: Block quote ends without a blank line; unexpected unindent.

> docs/cpu-hotplug.rst:76: SEVERE: Unexpected section title.

> 

> }

> {

> docs/cpu-hotplug.rst:78: WARNING: Block quote ends without a blank line; unexpected unindent.

> 

> These are the result of not indicating one of the literal

> blocks by finishing the preceding paragraph with the "::" marker.

> 

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> Acked-by: Aleksandar Markovic <amarkovic@wavecomp.com>

> Message-id: 20190228145624.24885-2-peter.maydell@linaro.org

> ---

>  docs/cpu-hotplug.rst | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)


Reviewed-by: Richard Henderson <richard.henderson@linaro.org>



r~
Cleber Rosa March 7, 2019, 12:04 a.m. UTC | #2
On Tue, Mar 05, 2019 at 05:21:28PM +0000, Peter Maydell wrote:
> sphinx-build complains:

> 

> docs/cpu-hotplug.rst:67: ERROR: Unexpected indentation.

> docs/cpu-hotplug.rst:69: ERROR: Unexpected indentation.

> docs/cpu-hotplug.rst:74: WARNING: Block quote ends without a blank line; unexpected unindent.

> docs/cpu-hotplug.rst:75: WARNING: Block quote ends without a blank line; unexpected unindent.

> docs/cpu-hotplug.rst:76: SEVERE: Unexpected section title.

> 

> }

> {

> docs/cpu-hotplug.rst:78: WARNING: Block quote ends without a blank line; unexpected unindent.

> 

> These are the result of not indicating one of the literal

> blocks by finishing the preceding paragraph with the "::" marker.

> 

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> Acked-by: Aleksandar Markovic <amarkovic@wavecomp.com>

> Message-id: 20190228145624.24885-2-peter.maydell@linaro.org

> ---

>  docs/cpu-hotplug.rst | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/docs/cpu-hotplug.rst b/docs/cpu-hotplug.rst

> index 1c268e00b41..e2d4e893b01 100644

> --- a/docs/cpu-hotplug.rst

> +++ b/docs/cpu-hotplug.rst

> @@ -60,7 +60,7 @@ vCPU hotplug

>      hot-plugged (no "qom-path" member).  From its output in step (3), we

>      can see that ``IvyBridge-IBRS-x86_64-cpu`` is present in socket 0,

>      while hot-plugging a CPU into socket 1 requires passing the listed

> -    properties to QMP ``device_add``:

> +    properties to QMP ``device_add``::

>  

>        (QEMU) device_add id=cpu-2 driver=IvyBridge-IBRS-x86_64-cpu socket-id=1 core-id=0 thread-id=0

>        {

> -- 

> 2.20.1

> 

> 


This is an actual reStructuredText syntax violation (at a layer lower
than sphinx) and thus can also be seen by simpler tools such as
rst2{man,html,...}:

   $ rst2html docs/cpu-hotplug.rst 1>/dev/null 
   docs/cpu-hotplug.rst:67: (ERROR/3) Unexpected indentation.
   docs/cpu-hotplug.rst:69: (ERROR/3) Unexpected indentation.
   docs/cpu-hotplug.rst:74: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
   docs/cpu-hotplug.rst:75: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
   docs/cpu-hotplug.rst:76: (SEVERE/4) Unexpected section title.

   }
   {
   Exiting due to level-4 (SEVERE) system message.

But I'm assuming the extended sphinx roles/directives will be used, so
the only way to check against future breakage would be to build the
docs.

Do we have strong position in favor or against putting that into the
"common" `make check` flow?  Anyway, these are all possibilities for
future enhancements, so:

Reviewed-by: Cleber Rosa <crosa@redhat.com>
Peter Maydell March 7, 2019, 9:47 a.m. UTC | #3
On Thu, 7 Mar 2019 at 00:04, Cleber Rosa <crosa@redhat.com> wrote:
> But I'm assuming the extended sphinx roles/directives will be used, so

> the only way to check against future breakage would be to build the

> docs.

>

> Do we have strong position in favor or against putting that into the

> "common" `make check` flow?


Assuming the host has sphinx-build, the docs will be built as
part of "make", so actual errors will be caught. We should
add the sphinx-build flag to make warnings into errors in
the same way we use -Werror, but I wanted to get the series
into master first.

thanks
-- PMM
Cleber Rosa March 7, 2019, 11:15 a.m. UTC | #4
On Thu, Mar 07, 2019 at 09:47:18AM +0000, Peter Maydell wrote:
> On Thu, 7 Mar 2019 at 00:04, Cleber Rosa <crosa@redhat.com> wrote:

> > But I'm assuming the extended sphinx roles/directives will be used, so

> > the only way to check against future breakage would be to build the

> > docs.

> >

> > Do we have strong position in favor or against putting that into the

> > "common" `make check` flow?

> 

> Assuming the host has sphinx-build, the docs will be built as

> part of "make", so actual errors will be caught. We should


That's even better IMO.

> add the sphinx-build flag to make warnings into errors in

> the same way we use -Werror, but I wanted to get the series

> into master first.

>


Absolutely!

Regards,
- Cleber.

> thanks

> -- PMM
diff mbox series

Patch

diff --git a/docs/cpu-hotplug.rst b/docs/cpu-hotplug.rst
index 1c268e00b41..e2d4e893b01 100644
--- a/docs/cpu-hotplug.rst
+++ b/docs/cpu-hotplug.rst
@@ -60,7 +60,7 @@  vCPU hotplug
     hot-plugged (no "qom-path" member).  From its output in step (3), we
     can see that ``IvyBridge-IBRS-x86_64-cpu`` is present in socket 0,
     while hot-plugging a CPU into socket 1 requires passing the listed
-    properties to QMP ``device_add``:
+    properties to QMP ``device_add``::
 
       (QEMU) device_add id=cpu-2 driver=IvyBridge-IBRS-x86_64-cpu socket-id=1 core-id=0 thread-id=0
       {