summaryrefslogtreecommitdiff
path: root/tools/cpplint.py
diff options
context:
space:
mode:
authorFedor Indutny <fedor.indutny@gmail.com>2013-10-16 20:34:39 +0400
committerFedor Indutny <fedor.indutny@gmail.com>2013-10-17 00:34:18 +0400
commit7063c59b97fa4f365f9e5ec1f563235ede4104db (patch)
tree3b6c428fcefd43a20582275ef0cb78e63fa4f057 /tools/cpplint.py
parenta2d1cbef6baabd767cef523078eb4e5921429d09 (diff)
downloadnode-7063c59b97fa4f365f9e5ec1f563235ede4104db.tar.gz
cpplint: disallow comma-first in C++
Diffstat (limited to 'tools/cpplint.py')
-rw-r--r--tools/cpplint.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/cpplint.py b/tools/cpplint.py
index 3993d0856..5dd1b25a2 100644
--- a/tools/cpplint.py
+++ b/tools/cpplint.py
@@ -2108,6 +2108,9 @@ def CheckStyle(filename, clean_lines, linenum, file_extension, error):
'the base class list in a class definition, the colon should '
'be on the following line.')
+ if len(line) > initial_spaces and line[initial_spaces] == ',':
+ error(filename, linenum, 'whitespace/commafirst', 4,
+ 'Comma-first style is not allowed')
# Check if the line is a header guard.
is_header_guard = False