Message ID | 20200714072441.241494-1-roid@mellanox.com |
---|---|
State | Accepted |
Delegated to: | Ilya Maximets |
Headers | show |
Series | [ovs-dev,v3] checkpatch: Add argument to skip gerrit change id check | expand |
Bleep bloop. Greetings Roi Dayan, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. checkpatch: WARNING: Unexpected sign-offs from developers who are not authors or co-authors or committers: Ben Pfaff <blp@ovn.org> Lines checked: 65, Warnings: 1, Errors: 0 Please check this out. If you feel there has been an error, please email aconole@redhat.com Thanks, 0-day Robot
On 2020-07-14 10:24 AM, Roi Dayan wrote: > This arg can be used internally by groups using gerrit for code reviews. > > Signed-off-by: Roi Dayan <roid@mellanox.com> > Signed-off-by: Ben Pfaff <blp@ovn.org> > --- > > Notes: > v3 > - use line length 79 > > utilities/checkpatch.py | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py > index fc9e20bf1b5f..7f1d21a40e1f 100755 > --- a/utilities/checkpatch.py > +++ b/utilities/checkpatch.py > @@ -182,6 +182,7 @@ __regex_if_macros = re.compile(r'^ +(%s) \([\S]([\s\S]+[\S])*\) { +\\' % > > skip_leading_whitespace_check = False > skip_trailing_whitespace_check = False > +skip_gerrit_change_id_check = False > skip_block_whitespace_check = False > skip_signoff_check = False > > @@ -814,7 +815,8 @@ def ovs_checkpatch_parse(text, filename, author=None, committer=None): > elif is_co_author.match(line): > m = is_co_author.match(line) > co_authors.append(m.group(2)) > - elif is_gerrit_change_id.match(line): > + elif (is_gerrit_change_id.match(line) and > + not skip_gerrit_change_id_check): > print_error( > "Remove Gerrit Change-Id's before submitting upstream.") > print("%d: %s\n" % (lineno, line)) > @@ -885,7 +887,8 @@ Check options: > -s|--skip-signoff-lines Tolerate missing Signed-off-by line > -S|--spellcheck Check C comments and commit-message for possible > spelling mistakes > --t|--skip-trailing-whitespace Skips the trailing whitespace test""" > +-t|--skip-trailing-whitespace Skips the trailing whitespace test > + --skip-gerrit-change-id Skips the gerrit change id test""" > % sys.argv[0]) > > > @@ -942,6 +945,7 @@ if __name__ == '__main__': > "skip-leading-whitespace", > "skip-signoff-lines", > "skip-trailing-whitespace", > + "skip-gerrit-change-id", > "spellcheck", > "quiet"]) > except: > @@ -960,6 +964,8 @@ if __name__ == '__main__': > skip_signoff_check = True > elif o in ("-t", "--skip-trailing-whitespace"): > skip_trailing_whitespace_check = True > + elif o in ("--skip-gerrit-change-id"): > + skip_gerrit_change_id_check = True > elif o in ("-f", "--check-file"): > checking_file = True > elif o in ("-S", "--spellcheck"): > travis https://travis-ci.org/github/roidayan/ovs/builds/707903637
On Tue, Jul 14, 2020 at 10:24:41AM +0300, Roi Dayan wrote: > This arg can be used internally by groups using gerrit for code reviews. > > Signed-off-by: Roi Dayan <roid@mellanox.com> > Signed-off-by: Ben Pfaff <blp@ovn.org> > --- Acked-by: Flavio Leitner <fbl@sysclose.org>
On 7/14/20 3:03 PM, Flavio Leitner wrote: > On Tue, Jul 14, 2020 at 10:24:41AM +0300, Roi Dayan wrote: >> This arg can be used internally by groups using gerrit for code reviews. >> >> Signed-off-by: Roi Dayan <roid@mellanox.com> >> Signed-off-by: Ben Pfaff <blp@ovn.org> >> --- > > Acked-by: Flavio Leitner <fbl@sysclose.org> > Thanks! Applied. Best regards, Ilya Maximets.
diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py index fc9e20bf1b5f..7f1d21a40e1f 100755 --- a/utilities/checkpatch.py +++ b/utilities/checkpatch.py @@ -182,6 +182,7 @@ __regex_if_macros = re.compile(r'^ +(%s) \([\S]([\s\S]+[\S])*\) { +\\' % skip_leading_whitespace_check = False skip_trailing_whitespace_check = False +skip_gerrit_change_id_check = False skip_block_whitespace_check = False skip_signoff_check = False @@ -814,7 +815,8 @@ def ovs_checkpatch_parse(text, filename, author=None, committer=None): elif is_co_author.match(line): m = is_co_author.match(line) co_authors.append(m.group(2)) - elif is_gerrit_change_id.match(line): + elif (is_gerrit_change_id.match(line) and + not skip_gerrit_change_id_check): print_error( "Remove Gerrit Change-Id's before submitting upstream.") print("%d: %s\n" % (lineno, line)) @@ -885,7 +887,8 @@ Check options: -s|--skip-signoff-lines Tolerate missing Signed-off-by line -S|--spellcheck Check C comments and commit-message for possible spelling mistakes --t|--skip-trailing-whitespace Skips the trailing whitespace test""" +-t|--skip-trailing-whitespace Skips the trailing whitespace test + --skip-gerrit-change-id Skips the gerrit change id test""" % sys.argv[0]) @@ -942,6 +945,7 @@ if __name__ == '__main__': "skip-leading-whitespace", "skip-signoff-lines", "skip-trailing-whitespace", + "skip-gerrit-change-id", "spellcheck", "quiet"]) except: @@ -960,6 +964,8 @@ if __name__ == '__main__': skip_signoff_check = True elif o in ("-t", "--skip-trailing-whitespace"): skip_trailing_whitespace_check = True + elif o in ("--skip-gerrit-change-id"): + skip_gerrit_change_id_check = True elif o in ("-f", "--check-file"): checking_file = True elif o in ("-S", "--spellcheck"):