allow lambda function syntax in cpplint

Summary: as title

Test Plan: arc lint

Reviewers: kailiu

Reviewed By: kailiu

CC: leveldb

Differential Revision: https://reviews.facebook.net/D16251
main
Lei Jin 11 years ago
parent 15ac5ad1f6
commit d45d17b2a3
  1. 5
      linters/cpp_linter/cpplint.py

@ -3104,6 +3104,11 @@ def CheckBraces(filename, clean_lines, linenum, error):
'LOCKS_EXCLUDED', 'INTERFACE_DEF')) or
Search(r'\s+=\s*$', line_prefix)):
match = None
# Whitelist lambda function definition which also requires a ";" after
# closing brace
if match:
if Match(r'^.*\[.*\]\s*(.*\)\s*)\{', line):
match = None
else:
# Try matching cases 2-3.

Loading…
Cancel
Save