ignore alt_tokens when checking fncall spacing

This commit is contained in:
Benjamin Kietzman 2019-10-01 16:58:43 -04:00
parent 5651966e02
commit 6aa026b289

2
cpplint/cpplint.py vendored
View File

@ -2992,6 +2992,8 @@ def CheckSpacingForFunctionCall(filename, clean_lines, linenum, error):
not Search(r'_{0,2}asm_{0,2}\s+_{0,2}volatile_{0,2}\s+\(', fncall) and not Search(r'_{0,2}asm_{0,2}\s+_{0,2}volatile_{0,2}\s+\(', fncall) and
not Search(r'#\s*define|typedef|using\s+\w+\s*=', fncall) and not Search(r'#\s*define|typedef|using\s+\w+\s*=', fncall) and
not Search(r'\w\s+\((\w+::)*\*\w+\)\(', fncall) and not Search(r'\w\s+\((\w+::)*\*\w+\)\(', fncall) and
not Search(r'\b(' + '|'.join(_ALT_TOKEN_REPLACEMENT.keys()) + r')\b\s+\(',
fncall) and
not Search(r'\bcase\s+\(', fncall)): not Search(r'\bcase\s+\(', fncall)):
# TODO(unknown): Space after an operator function seem to be a common # TODO(unknown): Space after an operator function seem to be a common
# error, silence those for now by restricting them to highest verbosity. # error, silence those for now by restricting them to highest verbosity.