diff mbox series

[ovs-dev,v2,1/2] checkpatch: Add argument to skip committer signoff check.

Message ID 20231105083810.797749-2-roid@nvidia.com
State Accepted, archived
Delegated to: Simon Horman
Headers show
Series Add argument to skip committer signoff check | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Roi Dayan Nov. 5, 2023, 8:38 a.m. UTC
From: Salem Sol <salems@nvidia.com>

Introduce --skip-committer-signoff arg that can be used internally
by groups using gerrit for code reviews and gerrit maintainers could
do the rebase instead of the author or push upstream commits to be
merged through gerrit.

Signed-off-by: Salem Sol <salems@nvidia.com>
Acked-by: Roi Dayan <roid@nvidia.com>
---
 utilities/checkpatch.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Comments

Eelco Chaudron Nov. 16, 2023, 8:39 a.m. UTC | #1
On 5 Nov 2023, at 9:38, Roi Dayan wrote:

> From: Salem Sol <salems@nvidia.com>
>
> Introduce --skip-committer-signoff arg that can be used internally
> by groups using gerrit for code reviews and gerrit maintainers could
> do the rebase instead of the author or push upstream commits to be
> merged through gerrit.
>
> Signed-off-by: Salem Sol <salems@nvidia.com>
> Acked-by: Roi Dayan <roid@nvidia.com>

Thanks for resubmitting this with a test case!

Acked-by: Eelco Chaudron <echaudro@redhat.com>
diff mbox series

Patch

diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index 3f42c44f2933..a56f429d4c38 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -189,6 +189,7 @@  skip_trailing_whitespace_check = False
 skip_gerrit_change_id_check = False
 skip_block_whitespace_check = False
 skip_signoff_check = False
+skip_committer_signoff_check = False
 
 # Don't enforce character limit on files that include these characters in their
 # name, as they may have legitimate reasons to have longer lines.
@@ -917,7 +918,8 @@  def ovs_checkpatch_parse(text, filename, author=None, committer=None):
                             break
                     if (committer
                         and author != committer
-                        and committer not in signatures):
+                        and committer not in signatures
+                        and not skip_committer_signoff_check):
                         print_error("Committer %s needs to sign off."
                                     % committer)
 
@@ -1035,7 +1037,8 @@  Check options:
 -S|--spellcheck                Check C comments and commit-message for possible
                                spelling mistakes
 -t|--skip-trailing-whitespace  Skips the trailing whitespace test
-   --skip-gerrit-change-id     Skips the gerrit change id test"""
+   --skip-gerrit-change-id     Skips the gerrit change id test
+   --skip-committer-signoff    Skips the committer sign-off test"""
           % sys.argv[0])
 
 
@@ -1106,6 +1109,7 @@  if __name__ == '__main__':
                                        "skip-signoff-lines",
                                        "skip-trailing-whitespace",
                                        "skip-gerrit-change-id",
+                                       "skip-committer-signoff",
                                        "spellcheck",
                                        "quiet"])
     except:
@@ -1126,6 +1130,8 @@  if __name__ == '__main__':
             skip_trailing_whitespace_check = True
         elif o in ("--skip-gerrit-change-id"):
             skip_gerrit_change_id_check = True
+        elif o in ("--skip-committer-signoff"):
+            skip_committer_signoff_check = True
         elif o in ("-f", "--check-file"):
             checking_file = True
         elif o in ("-S", "--spellcheck"):