[PATCH] devtools: forbid reference to doc.dpdk.org/guides
David Marchand
david.marchand at redhat.com
Wed Jun 21 10:09:20 CEST 2023
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 /.
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
devtools/checkpatches.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 15d5d67094..39235da985 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -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' \
--
2.40.1
More information about the dev
mailing list