Skip to content

Commit

Permalink
checkpatch: Add argument to skip committer signoff check.
Browse files Browse the repository at this point in the history
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>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Simon Horman <horms@ovn.org>
  • Loading branch information
salemsol authored and Simon Horman committed Nov 16, 2023
1 parent 4d74e23 commit 74bfe37
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions utilities/checkpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def reset_counters():
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.
Expand Down Expand Up @@ -920,7 +921,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)

Expand Down Expand Up @@ -1038,7 +1040,8 @@ def usage():
-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])


Expand Down Expand Up @@ -1109,6 +1112,7 @@ def partition(pred, iterable):
"skip-signoff-lines",
"skip-trailing-whitespace",
"skip-gerrit-change-id",
"skip-committer-signoff",
"spellcheck",
"quiet"])
except:
Expand All @@ -1129,6 +1133,8 @@ def partition(pred, iterable):
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"):
Expand Down

0 comments on commit 74bfe37

Please sign in to comment.