Change the test so a tab character before a braces is ok

This commit is contained in:
Micke Prag 2012-06-15 14:53:22 +02:00
parent 506c740d81
commit d3b75fc4f6

View file

@ -1883,9 +1883,9 @@ def CheckSpacing(filename, clean_lines, linenum, error):
# an initializer list, for instance), you should have spaces before your
# braces. And since you should never have braces at the beginning of a line,
# this is an easy test.
if Search(r'[^ ({]{', line):
if Search(r'[^ \t({]{', line): # The check for tab was added by Telldus
error(filename, linenum, 'whitespace/braces', 5,
'Missing space before {')
'Missing whitespace before {')
# Make sure '} else {' has spaces.
if Search(r'}else', line):