From 3e87ceaf336cb349c758c08e27c3e85295903031 Mon Sep 17 00:00:00 2001 From: Bruce Dawson Date: Thu, 30 Apr 2020 17:56:07 +0000 Subject: [PATCH] Allow a space after __except __except () is the canonical layout for code that uses __try/__except, Microsoft's structured exception handling. The majority of __except uses in our code use a space after the keyword. However cpplint.py thinks that __except is a function name. Apparently we have been forcing this through by ignoring the presubmits. This just adds __except to the list of exceptions to the whitespace/parens rule. Change-Id: I2384cd32f26e3aa6a4b0150451a9a61147483e2d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2173644 Commit-Queue: Aaron Gable Auto-Submit: Bruce Dawson Reviewed-by: Aaron Gable --- cpplint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpplint.py b/cpplint.py index abfb5116a3..daf60683f4 100755 --- a/cpplint.py +++ b/cpplint.py @@ -2869,7 +2869,7 @@ def CheckSpacingForFunctionCall(filename, clean_lines, linenum, error): 'Extra space after (') if (Search(r'\w\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|__except|using\s+\w+\s*=', fncall) and not Search(r'\w\s+\((\w+::)*\*\w+\)\(', fncall) and not Search(r'\bcase\s+\(', fncall)): # TODO(unknown): Space after an operator function seem to be a common