Skip to content

Commit 1a7ca85

Browse files
author
Lukasz A.J. Wrona
committed
Remove linter braces rule
Braces are already checked by clang-format, and this rule doesn't allow me to use initializer list constructors/uniform initialization in unit tests
1 parent 4fe1f6d commit 1a7ca85

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

scripts/cpplint.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3974,13 +3974,6 @@ def CheckBracesSpacing(filename, clean_lines, linenum, nesting_state, error):
39743974
for offset in xrange(endlinenum + 1,
39753975
min(endlinenum + 3, clean_lines.NumLines() - 1)):
39763976
trailing_text += clean_lines.elided[offset]
3977-
# We also suppress warnings for `uint64_t{expression}` etc., as the style
3978-
# guide recommends brace initialization for integral types to avoid
3979-
# overflow/truncation.
3980-
if (not Match(r'^[\s}]*[{.;,)<>\]:]', trailing_text)
3981-
and not _IsType(clean_lines, nesting_state, leading_text)):
3982-
error(filename, linenum, 'whitespace/braces', 5,
3983-
'Missing space before {')
39843977

39853978
# You shouldn't have a space before a semicolon at the end of the line.
39863979
# There's a special case for "for" since the style guide allows space before

0 commit comments

Comments
 (0)