From 21afb6cf7a058be3ef3cdb09ef142adc579497b9 Mon Sep 17 00:00:00 2001 From: ksole Date: Sat, 23 Apr 2016 15:19:21 +0200 Subject: [PATCH] Fix wrong report for "public slots" based on https://github.com/google/styleguide/issues/30 original patch by ksole...@gmail.com Source code: class X : public QObject { ... public slots: ... } causes incorrectly message "Weird number of spaces at line-start. Are you using a 2-space indent? [whitespace/indent] [3]". --- cpplint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpplint.py b/cpplint.py index 7ccdda0..dad4bc6 100644 --- a/cpplint.py +++ b/cpplint.py @@ -4439,7 +4439,7 @@ def CheckStyle(filename, clean_lines, linenum, file_extension, nesting_state, # if(match($0, " <<")) complain = 0; # if(match(prev, " +for \\(")) complain = 0; # if(prevodd && match(prevprev, " +for \\(")) complain = 0; - scope_or_label_pattern = r'\s*\w+\s*:\s*\\?$' + scope_or_label_pattern = r'\s*\w+\s*\w*:\s*\\?$' classinfo = nesting_state.InnermostClass() initial_spaces = 0 cleansed_line = clean_lines.elided[linenum]