mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +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] == ' ':
|
||||
|
@@ -4656,7 +4656,7 @@ set_option_value (
|
||||
return NULL;
|
||||
}
|
||||
if (flags & P_STRING) {
|
||||
const char *s = (char *) string;
|
||||
const char *s = (const char *)string;
|
||||
if (s == NULL) {
|
||||
s = "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user