diff options
| author | Fedor Indutny <fedor.indutny@gmail.com> | 2013-10-16 20:34:39 +0400 |
|---|---|---|
| committer | Fedor Indutny <fedor.indutny@gmail.com> | 2013-10-17 00:34:18 +0400 |
| commit | 7063c59b97fa4f365f9e5ec1f563235ede4104db (patch) | |
| tree | 3b6c428fcefd43a20582275ef0cb78e63fa4f057 /tools/cpplint.py | |
| parent | a2d1cbef6baabd767cef523078eb4e5921429d09 (diff) | |
| download | node-7063c59b97fa4f365f9e5ec1f563235ede4104db.tar.gz | |
cpplint: disallow comma-first in C++
Diffstat (limited to 'tools/cpplint.py')
| -rw-r--r-- | tools/cpplint.py | 3 |
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 |
