mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
clint: Add more exceptions to “space after a cast” rule
Python does not allow branching here, complaining that look-behind is not fixed-width.
This commit is contained in:
parent
10d9c6d813
commit
a1cce83d3c
@ -2516,6 +2516,10 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
|
||||
|
||||
cast_line = re.sub(r'^# *define +\w+\([^)]*\)', '', line)
|
||||
match = Search(r'(?<!\bkvec_t)'
|
||||
r'(?<!\bkvec_withinit_t)'
|
||||
r'(?<!\bklist_t)'
|
||||
r'(?<!\bkliter_t)'
|
||||
r'(?<!\bkhash_t)'
|
||||
r'\((?:const )?(?:struct )?[a-zA-Z_]\w*(?: *\*(?:const)?)*\)'
|
||||
r' +'
|
||||
r'-?(?:\*+|&)?(?:\w+|\+\+|--|\()', cast_line)
|
||||
|
Loading…
Reference in New Issue
Block a user