From 9de66ec0274f608fab2213e7c450a33d5feb1c39 Mon Sep 17 00:00:00 2001 From: Alexey Porotnikov Date: Mon, 22 Jan 2018 20:43:41 +0200 Subject: [PATCH] add "return" to the compound literal exclusions (#1113) inhibits readability/brace warning for compound literals in return statement --- scripts/python/cpplint.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/python/cpplint.py b/scripts/python/cpplint.py index 95c0c32..825c87c 100755 --- a/scripts/python/cpplint.py +++ b/scripts/python/cpplint.py @@ -4091,6 +4091,7 @@ def CheckTrailingSemicolon(filename, clean_lines, linenum, error): (func and not Search(r'\boperator\s*\[\s*\]', func.group(1))) or Search(r'\b(?:struct|union)\s+alignas\s*$', line_prefix) or Search(r'\bdecltype$', line_prefix) or + Search(r'\breturn\s*$', line_prefix) or Search(r'\s+=\s*$', line_prefix)): match = None if (match and