mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
Deactivated remaining clint rules on error
- about braces opening on same lines
This commit is contained in:
parent
d9aa889898
commit
8c3ac34767
@ -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
4
cpplint.py
vendored
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user