mirror of
https://github.com/neovim/neovim.git
synced 2025-11-10 12:35:29 +00:00
*: Fix linter errors
Also adds one exception to linter rules:
typedef struct {
kvec_t(Object) stack;
} EncodedData;
is completely valid (from the style guide point of view) code.
This commit is contained in:
@@ -2515,7 +2515,8 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
|
||||
'after the hash')
|
||||
|
||||
cast_line = re.sub(r'^# *define +\w+\([^)]*\)', '', line)
|
||||
match = Search(r'\((?:const )?(?:struct )?[a-zA-Z_]\w*(?: *\*(?:const)?)*\)'
|
||||
match = Search(r'(?<!\bkvec_t)'
|
||||
r'\((?:const )?(?:struct )?[a-zA-Z_]\w*(?: *\*(?:const)?)*\)'
|
||||
r' +'
|
||||
r'-?(?:\*+|&)?(?:\w+|\+\+|--|\()', cast_line)
|
||||
if match and line[0] == ' ':
|
||||
|
||||
Reference in New Issue
Block a user