mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 12:28:18 +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')
|
'after the hash')
|
||||||
|
|
||||||
cast_line = re.sub(r'^# *define +\w+\([^)]*\)', '', line)
|
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' +'
|
||||||
r'-?(?:\*+|&)?(?:\w+|\+\+|--|\()', cast_line)
|
r'-?(?:\*+|&)?(?:\w+|\+\+|--|\()', cast_line)
|
||||||
if match and line[0] == ' ':
|
if match and line[0] == ' ':
|
||||||
|
@@ -4656,7 +4656,7 @@ set_option_value (
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (flags & P_STRING) {
|
if (flags & P_STRING) {
|
||||||
const char *s = (char *) string;
|
const char *s = (const char *)string;
|
||||||
if (s == NULL) {
|
if (s == NULL) {
|
||||||
s = "";
|
s = "";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user