The current __check_doc_is_listed() verifies that the new .rst file is
listed in Documentation/automake.mk with the full path (i.e:
"{directory}/{filename}").
While this holds true for generic documentation files, which are added
to DOC_SOURCE with the full path, it's not true for rST manpages which
are added only by filename to RST_MANPAGES target (see
Documentation/automake.mk).
This makes the current implementation of the check to incorrectly raise
a warning as follows even though the patch does add the file to
RST_MANPAGES:
"""
WARNING: New doc ovs-flowviz.8.rst not listed in
Documentation/automake.mk
"""
Fix it by making the {dir}/ part of the docre regexp optional.
Signed-off-by: Adrian Moreno <[email protected]>
---
utilities/checkpatch.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index e0cab6b9f..48fb35ff5 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -479,7 +479,7 @@ def __check_doc_is_listed(text, doctype, docdir, docfile):
docre = re.compile(r'\n\+.*{}'.format(docfile.replace('.rst', '')))
elif doctype == 'automake':
beginre = re.compile(r'\+\+\+.*Documentation/automake.mk')
- docre = re.compile(r'\n\+\t{}/{}'.format(docdir, docfile))
+ docre = re.compile(r'\n\+\t(?:{}/)?{}'.format(docdir, docfile))
else:
raise NotImplementedError("Invalid doctype: {}".format(doctype))
--
2.44.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev