From f153497c708a5392bd274a7f14172856e78e467e Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 13 Jul 2021 14:26:59 +0200 Subject: check-style: Ignore chunks that only contain deleted code These have no code style to check. --- check-style.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'check-style.py') diff --git a/check-style.py b/check-style.py index 4b59f83ae..eebd13659 100755 --- a/check-style.py +++ b/check-style.py @@ -29,7 +29,7 @@ def find_chunks(diff): len = int(match.group(2)) end = start + len - if file.endswith('.c') or file.endswith('.h') or file.endswith('.vala'): + if len > 0 and (file.endswith('.c') or file.endswith('.h') or file.endswith('.vala')): chunks.append({ 'file': file, 'start': start, 'end': end }) return chunks -- cgit v1.2.1