[ovs-dev] [PATCH 1/2] checkpatch: Add explicit test for mailing list as author.

Ben Pfaff blp at ovn.org
Thu Nov 1 15:06:31 UTC 2018


Somehow some such patches snuck through.  checkpatch caught them (and the
committer missed that) but this makes it even more explicit.

Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 tests/checkpatch.at     | 8 ++++++++
 utilities/checkpatch.py | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/tests/checkpatch.at b/tests/checkpatch.at
index 8af3a8c0371e..bd7422494e33 100755
--- a/tests/checkpatch.at
+++ b/tests/checkpatch.at
@@ -51,6 +51,14 @@ try_checkpatch \
     Commit: A" \
    "ERROR: Author A needs to sign off."
 
+# Single author but somehow the mailing list is the author.
+try_checkpatch \
+   "Author: Foo Bar via dev <ovs-dev at openvswitch.org>
+    Commit: A
+
+    Signed-off-by: A" \
+   "ERROR: Author should not be mailing list."
+
 # Sign-off for single author and different committer.
 try_checkpatch \
    "Author: A
diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index 5f5dd8318e32..54aa4b6346db 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -731,6 +731,9 @@ def ovs_checkpatch_parse(text, filename, author=None, committer=None):
                     if not author:
                         print_error("Patch lacks author.")
                         continue
+                    if " via " in author or "@openvswitch.org" in author:
+                        print_error("Author should not be mailing list.")
+                        continue
                     if author in co_authors:
                         print_error("Author should not be also be co-author.")
                         continue
-- 
2.16.1



More information about the dev mailing list