mirror of
https://github.com/neovim/neovim.git
synced 2025-12-05 22:22:44 +00:00
clint: disregard compound literal return
This allows lines like:
return (my_struct_type) {
.my_int = 5,
.my_str = ""
};
Thanks to @watk for finding and fixing it!
This commit is contained in:
committed by
Thiago de Arruda
parent
96a9b5eaee
commit
b591447f77
3
clint.py
3
clint.py
@@ -2307,7 +2307,8 @@ def CheckBraces(filename, clean_lines, linenum, error):
|
||||
'TEST', 'TEST_F', 'MATCHER', 'MATCHER_P', 'TYPED_TEST',
|
||||
'EXCLUSIVE_LOCKS_REQUIRED', 'SHARED_LOCKS_REQUIRED',
|
||||
'LOCKS_EXCLUDED', 'INTERFACE_DEF')) or
|
||||
Search(r'\s+=\s*$', line_prefix)):
|
||||
Search(r'\s+=\s*$', line_prefix) or
|
||||
Search(r'^\s*return\s*$', line_prefix)):
|
||||
match = None
|
||||
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user