diff options
author | Ilya Maximets <i.maximets@samsung.com> | 2017-07-14 13:57:21 +0300 |
---|---|---|
committer | Russell Bryant <russell@ovn.org> | 2017-07-26 16:41:58 -0400 |
commit | bc03d850d62f0bedb50f6d607ae62eb1175036a0 (patch) | |
tree | 00b8ecfb80b029fb3cd0ce4ad10528de017f047d /utilities | |
parent | 5ca89127382d3b0651383330e616b358a34a0dcf (diff) | |
download | openvswitch-bc03d850d62f0bedb50f6d607ae62eb1175036a0.tar.gz |
checkpatch: Don't allow Gerrit Change-Ids.
Local Gerrit Change-Ids are not welcome in common repository.
Inspired by checkpatch.pl from Linux Kernel.
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Russell Bryant <russell@ovn.org>
Diffstat (limited to 'utilities')
-rwxr-xr-x | utilities/checkpatch.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py index 65d188d60..fe266ac50 100755 --- a/utilities/checkpatch.py +++ b/utilities/checkpatch.py @@ -320,6 +320,8 @@ def ovs_checkpatch_parse(text, filename): re.I | re.M | re.S) is_co_author = re.compile(r'(\s*(Co-authored-by: )(.*))$', re.I | re.M | re.S) + is_gerrit_change_id = re.compile(r'(\s*(change-id: )(.*))$', + re.I | re.M | re.S) for line in text.split('\n'): if current_file != previous_file: @@ -357,6 +359,10 @@ def ovs_checkpatch_parse(text, filename): elif is_co_author.match(line): m = is_co_author.match(line) co_authors.append(m.group(3)) + elif is_gerrit_change_id.match(line): + print_error( + "Remove Gerrit Change-Id's before submitting upstream.") + print("%d: %s\n" % (lineno, line)) elif parse == 2: newfile = hunks.match(line) if newfile: |