*: 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:
ZyX
2016-06-24 17:16:11 +03:00
parent 50f5bb8ade
commit 458a4d0444
7 changed files with 21 additions and 20 deletions

View File

@@ -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] == ' ':