Skip to content
This repository has been archived by the owner on Jul 13, 2019. It is now read-only.

Commit

Permalink
Fix wrong report for "public slots"
Browse files Browse the repository at this point in the history
based on google/styleguide#30
original patch by [email protected]

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]".
  • Loading branch information
ksole authored and tkruse committed Apr 24, 2016
1 parent a7c23c5 commit 78587cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpplint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 78587cc

Please sign in to comment.