diff mbox series

[kirkstone,5/9] manuals: add initial sphinx-lint support

Message ID 20240414182011.994356-6-michael.opdenacker@bootlin.com
State New
Headers show
Series documentation backports | expand

Commit Message

Michael Opdenacker April 14, 2024, 6:20 p.m. UTC
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 mbox series

Patch

diff --git a/documentation/Makefile b/documentation/Makefile
index 20dab5725c..4e0af4bd30 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -53,6 +53,9 @@  stylecheck:
 	vale sync
 	vale $(VALEOPTS) $(VALEDOCS)
 
+sphinx-lint:
+	sphinx-lint $(SOURCEDIR)
+
 epub: $(PNGs)
 	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
diff --git a/documentation/README b/documentation/README
index 8035418cac..b60472fcbf 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 sphinx-lint
+
 Sphinx theme and CSS customization
 ==================================