summaryrefslogtreecommitdiff
path: root/check-style.py
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2021-07-13 14:26:59 +0200
committerCarlos Garnacho <carlosg@gnome.org>2021-07-13 14:26:59 +0200
commitf153497c708a5392bd274a7f14172856e78e467e (patch)
treed8eeeabb3980e8980a2dfda40f890a85f1fbca31 /check-style.py
parentcdb7d836f3d21e8da2769a6bc3b531968ced3192 (diff)
downloadtracker-f153497c708a5392bd274a7f14172856e78e467e.tar.gz
check-style: Ignore chunks that only contain deleted code
These have no code style to check.
Diffstat (limited to 'check-style.py')
-rwxr-xr-xcheck-style.py2
1 files changed, 1 insertions, 1 deletions
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