Skip to contentSkip to conversation

devtools: forbid reference to doc.dpdk.org/guides

PATCH Applied David Marchand 3 participants 3 messages Jun 21, 2023 – Jul 20, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 devtools: forbid reference to doc.dpdk.org/guides

Putting links to doc.dpdk.org/guides in our documentation should be avoided because it makes the documentation point at the current state of the DPDK tree regardless of the version it is generated against.

Note: it should be acceptable to mention previous versions of DPDK (like in old release notes), so the pattern has an explicit trailing /.

---
 devtools/checkpatches.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
devtools/checkpatches.sh +8 -0
index 15d5d67094..39235da985 100755
@@ -175,6 +175,14 @@ check_forbidden_additions() { # <patch>
 		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
 		"$1" || res=1
 
+	# don't use external URL in documentation, prefer internal references
+	awk -v FOLDERS='doc' \
+		-v EXPRESSIONS='//doc.dpdk.org/guides/' \
+		-v RET_ON_FAIL=1 \
+		-v MESSAGE='Using explicit URL to doc.dpdk.org, prefer :ref: or :doc:' \
+		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+		"$1" || res=1
+
 	# '// XXX is not set' must be preferred over '#undef XXX'
 	awk -v FOLDERS='config/rte_config.h' \
 		-v EXPRESSIONS='#undef' \
Signature · 1 line
2.40.1
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · David Marchand

Putting links to doc.dpdk.org/guides in our documentation should be avoided because it makes the documentation point at the current state of the DPDK tree regardless of the version it is generated against.

Quoted 8 lines

Note: it should be acceptable to mention previous versions of DPDK (like in old release notes), so the pattern has an explicit trailing /.

---
 devtools/checkpatches.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
#2 lore raw

21/06/2023 12:51, Bruce Richardson:

Quoted 11 lines · David Marchand
Quoted 9 lines

Putting links to doc.dpdk.org/guides in our documentation should be avoided because it makes the documentation point at the current state of the DPDK tree regardless of the version it is generated against.

Note: it should be acceptable to mention previous versions of DPDK (like in old release notes), so the pattern has an explicit trailing /.

Applied, thanks.