mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 15:21:47 +00:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user