clint: Enable check for { positioned at the start of the line correctly

For some reason that was incorrectly hidden by “file is *not* \*.c or \*.h file” 
check.
This commit is contained in:
ZyX
2017-01-03 06:54:40 +03:00
parent efe1476d42
commit 287c69dd32

View File

@@ -2560,8 +2560,7 @@ def CheckBraces(filename, clean_lines, linenum, error):
line = clean_lines.elided[linenum] # get rid of comments and strings
if not (filename.endswith('.c') or filename.endswith('.h')):
if Match(r'\s*{\s*$', line):
if Match(r'\s+{\s*$', line):
# We allow an open brace to start a line in the case where someone
# is using braces in a block to explicitly create a new scope, which
# is commonly used to control the lifetime of stack-allocated