The scissors line is always three dashes on a line. The regex would previously match on any three dashes in a row.
This means that a patch (such as [1]) would trigger the parser state machine to advance beyond the signed-off checks. This bounds the check only to run on specific lines. 1: https://mail.openvswitch.org/pipermail/ovs-dev/2018-June/348625.html Fixes: c599d5ccf316 ("checkpatch.py: A simple script for finding patch issues") Signed-off-by: Aaron Conole <[email protected]> --- utilities/checkpatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py index 5a6d5f5ff..80b955f6b 100755 --- a/utilities/checkpatch.py +++ b/utilities/checkpatch.py @@ -619,7 +619,7 @@ def ovs_checkpatch_parse(text, filename): parse = 0 current_file = filename if checking_file else '' previous_file = '' - scissors = re.compile(r'^[\w]*---[\w]*') + scissors = re.compile(r'^[\w]*---[\w]*$') hunks = re.compile('^(---|\+\+\+) (\S+)') hunk_differences = re.compile( r'^@@ ([0-9-+]+),([0-9-+]+) ([0-9-+]+),([0-9-+]+) @@') -- 2.14.3 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
