From 8c3ac347679740930bd5f1e274cf1cbf7e0cb1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Tue, 11 Mar 2014 19:38:27 +0100 Subject: [PATCH] Deactivated remaining clint rules on error - about braces opening on same lines --- CMakeLists.txt | 2 +- cpplint.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6847b33..583166e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/cpplint.py b/cpplint.py index da63df9..e718083 100755 --- a/cpplint.py +++ b/cpplint.py @@ -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.