public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
* [PATCH] manuals: add initial sphinx-lint support
@ 2024-03-30 16:36 michael.opdenacker
  2024-04-02  7:53 ` [docs] " Jörg Sommer
  2024-04-02  9:59 ` Quentin Schulz
  0 siblings, 2 replies; 5+ messages in thread
From: michael.opdenacker @ 2024-03-30 16:36 UTC (permalink / raw)
  To: docs; +Cc: Michael Opdenacker

From: Michael Opdenacker <michael.opdenacker@bootlin.com>

Makes it possible to catch errors not reported by sphinx,
such as idle spaces. After customization, this should be used
to enforce our syntax conventions, such as two spaces after a "-"
character to introduce a list item.

Just run "make sphinx-lint".

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
 documentation/Makefile |  3 +++
 documentation/README   | 14 ++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/documentation/Makefile b/documentation/Makefile
index f3b775b3ec..cacb51c036 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -53,6 +53,9 @@ stylecheck:
 	vale sync
 	vale $(VALEOPTS) $(VALEDOCS)
 
+sphinx-lint:
+	sphinx-lint
+
 epub: $(PNGs)
 	$(SOURCEDIR)/set_versions.py
 	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/documentation/README b/documentation/README
index 8035418cac..e1451789b6 100644
--- a/documentation/README
+++ b/documentation/README
@@ -165,6 +165,20 @@ To run Vale:
 
  $ make stylecheck
 
+Link checking the Yocto Project documentation
+=============================================
+
+To fix errors which are not reported by Sphinx itself,
+the project uses sphinx-lint (https://github.com/sphinx-contrib/sphinx-lint).
+
+To install sphinx-lint:
+
+ $ pip install sphinx-lint
+
+To run sphinx-lint:
+
+ $ make sphinxlint
+
 Sphinx theme and CSS customization
 ==================================
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [docs] [PATCH] manuals: add initial sphinx-lint support
  2024-03-30 16:36 [PATCH] manuals: add initial sphinx-lint support michael.opdenacker
@ 2024-04-02  7:53 ` Jörg Sommer
  2024-04-02  9:23   ` Michael Opdenacker
  2024-04-02  9:59 ` Quentin Schulz
  1 sibling, 1 reply; 5+ messages in thread
From: Jörg Sommer @ 2024-04-02  7:53 UTC (permalink / raw)
  To: michael.opdenacker; +Cc: docs

Michael Opdenacker via lists.yoctoproject.org schrieb am Sa 30. Mär, 17:36 (+0100):
> 
> Just run "make sphinx-lint".

> +sphinx-lint:
> +	sphinx-lint

> +To run sphinx-lint:
> +
> + $ make sphinxlint

Is a dash missing in this command?


Regards Jörg

-- 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [docs] [PATCH] manuals: add initial sphinx-lint support
  2024-04-02  7:53 ` [docs] " Jörg Sommer
@ 2024-04-02  9:23   ` Michael Opdenacker
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Opdenacker @ 2024-04-02  9:23 UTC (permalink / raw)
  To: Jörg Sommer; +Cc: docs

Hi Jörg

On 4/2/24 at 09:53, Jörg Sommer wrote:
> Michael Opdenacker via lists.yoctoproject.org schrieb am Sa 30. Mär, 17:36 (+0100):
>> Just run "make sphinx-lint".
>> +sphinx-lint:
>> +	sphinx-lint
>> +To run sphinx-lint:
>> +
>> + $ make sphinxlint
> Is a dash missing in this command?


Oops, good catch. It was a leftover from my first version.
Fixed.
Thanks!
Michael.

-- 
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [docs] [PATCH] manuals: add initial sphinx-lint support
  2024-03-30 16:36 [PATCH] manuals: add initial sphinx-lint support michael.opdenacker
  2024-04-02  7:53 ` [docs] " Jörg Sommer
@ 2024-04-02  9:59 ` Quentin Schulz
  2024-04-02 13:22   ` Michael Opdenacker
  1 sibling, 1 reply; 5+ messages in thread
From: Quentin Schulz @ 2024-04-02  9:59 UTC (permalink / raw)
  To: michael.opdenacker, docs

Hi Michael,

On 3/30/24 17:36, Michael Opdenacker via lists.yoctoproject.org wrote:
> From: Michael Opdenacker <michael.opdenacker@bootlin.com>
> 
> Makes it possible to catch errors not reported by sphinx,
> such as idle spaces. After customization, this should be used
> to enforce our syntax conventions, such as two spaces after a "-"
> character to introduce a list item.
> 
> Just run "make sphinx-lint".
> 
> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
> ---
>   documentation/Makefile |  3 +++
>   documentation/README   | 14 ++++++++++++++
>   2 files changed, 17 insertions(+)
> 
> diff --git a/documentation/Makefile b/documentation/Makefile
> index f3b775b3ec..cacb51c036 100644
> --- a/documentation/Makefile
> +++ b/documentation/Makefile
> @@ -53,6 +53,9 @@ stylecheck:
>   	vale sync
>   	vale $(VALEOPTS) $(VALEDOCS)
>   
> +sphinx-lint:
> +	sphinx-lint
> +

I would pass $(SOURCEDIR) as argument as well.

Cheers,
Quentin


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [docs] [PATCH] manuals: add initial sphinx-lint support
  2024-04-02  9:59 ` Quentin Schulz
@ 2024-04-02 13:22   ` Michael Opdenacker
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Opdenacker @ 2024-04-02 13:22 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: docs

Hi Quentin

On 4/2/24 at 11:59, Quentin Schulz wrote:
> Hi Michael,
>
> On 3/30/24 17:36, Michael Opdenacker via lists.yoctoproject.org wrote:
>> From: Michael Opdenacker <michael.opdenacker@bootlin.com>
>>
>> Makes it possible to catch errors not reported by sphinx,
>> such as idle spaces. After customization, this should be used
>> to enforce our syntax conventions, such as two spaces after a "-"
>> character to introduce a list item.
>>
>> Just run "make sphinx-lint".
>>
>> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
>> ---
>>   documentation/Makefile |  3 +++
>>   documentation/README   | 14 ++++++++++++++
>>   2 files changed, 17 insertions(+)
>>
>> diff --git a/documentation/Makefile b/documentation/Makefile
>> index f3b775b3ec..cacb51c036 100644
>> --- a/documentation/Makefile
>> +++ b/documentation/Makefile
>> @@ -53,6 +53,9 @@ stylecheck:
>>       vale sync
>>       vale $(VALEOPTS) $(VALEDOCS)
>>   +sphinx-lint:
>> +    sphinx-lint
>> +
>
> I would pass $(SOURCEDIR) as argument as well.

Good idea!
I modified my branch.
Thanks
Michael.

-- 
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-02 13:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-30 16:36 [PATCH] manuals: add initial sphinx-lint support michael.opdenacker
2024-04-02  7:53 ` [docs] " Jörg Sommer
2024-04-02  9:23   ` Michael Opdenacker
2024-04-02  9:59 ` Quentin Schulz
2024-04-02 13:22   ` Michael Opdenacker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox