Message ID | 20231102123732.749484-1-roid@nvidia.com |
---|---|
State | Changes Requested |
Delegated to: | Eelco Chaudron |
Headers | show |
Series | [ovs-dev,1/1] checkpatch: Add argument to skip committer signoff check. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
On 2 Nov 2023, at 13:37, Roi Dayan via dev 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> This patch looks good to me, but can you add a testcase to checkpatch.at? //Eelco > --- > utilities/checkpatch.py | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > 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"): > -- > 2.38.0 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
On 02/11/2023 15:22, Eelco Chaudron wrote: > > > On 2 Nov 2023, at 13:37, Roi Dayan via dev 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> > > This patch looks good to me, but can you add a testcase to checkpatch.at? sure, will send v2. > > //Eelco > >> --- >> utilities/checkpatch.py | 10 ++++++++-- >> 1 file changed, 8 insertions(+), 2 deletions(-) >> >> 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"): >> -- >> 2.38.0 >> >> _______________________________________________ >> dev mailing list >> dev@openvswitch.org >> https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
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"):