Deactivated remaining clint rules on error

- about braces opening on same lines
This commit is contained in:
Sébastien Rombauts 2014-03-11 19:38:27 +01:00
parent d9aa889898
commit 8c3ac34767
2 changed files with 3 additions and 3 deletions

View File

@ -123,7 +123,7 @@ endif (WIN32)
# Optional additional targets:
option(SQLITECPP_RUN_CPPLINT "Run cpplint.py tool for Google C++ StyleGuide." OFF)
option(SQLITECPP_RUN_CPPLINT "Run cpplint.py tool for Google C++ StyleGuide." ON)
if (SQLITECPP_RUN_CPPLINT)
# add a cpplint target to the "all" target
add_custom_target(SQLiteCpp_cpplint

4
cpplint.py vendored
View File

@ -3002,14 +3002,14 @@ def CheckBraces(filename, clean_lines, linenum, error):
prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0]
if (not Search(r'[,;:}{(]\s*$', prevline) and
not Match(r'\s*#', prevline)):
error(filename, linenum, 'whitespace/braces', 4,
error(filename, linenum, 'whitespace/braces', 0,
'{ should almost always be at the end of the previous line')
# An else clause should be on the same line as the preceding closing brace.
if Match(r'\s*else\s*', line):
prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0]
if Match(r'\s*}\s*$', prevline):
error(filename, linenum, 'whitespace/newline', 4,
error(filename, linenum, 'whitespace/newline', 0,
'An else should appear on the same line as the preceding }')
# If braces come on one side of an else, they should be on both.