Skip to content

Commit 497c692

Browse files
peterschrammeltautschnig
authored andcommitted
No spaces around assignment operator
1 parent d90a14a commit 497c692

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/cpplint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3261,8 +3261,8 @@ def CheckOperatorSpacing(filename, clean_lines, linenum, error):
32613261
# Otherwise not. Note we only check for non-spaces on *both* sides;
32623262
# sometimes people put non-spaces on one side when aligning ='s among
32633263
# many lines (not that this is behavior that I approve of...)
3264-
match1 = Search(r'[\s](>=|<=|==|!=|&=|\^=|\|=|\+=|\*=|\/=|\%=|>|<|\^|\+|\/)', line)
3265-
match2 = Search(r'(>=|<=|==|!=|&=|\^=|\|=|\+=|\*=|\/=|\%=|>|<|!|\^|\+|\/)[\s]', line)
3264+
match1 = Search(r'[\s](=|>=|<=|==|!=|&=|\^=|\|=|\+=|\*=|\/=|\%=|>|<|\^|\+|\/)', line)
3265+
match2 = Search(r'(=|>=|<=|==|!=|&=|\^=|\|=|\+=|\*=|\/=|\%=|>|<|!|\^|\+|\/)[\s]', line)
32663266
if match1 and not Search(r'<<', line) and not Search(r'char \*', line) and not Search(r'\#include', line) and not Search(r'<.*[^\s]>', line):
32673267
# and not Search(r'\b(if|while|for) ', line)
32683268
# # Operators taken from [lex.operators] in C++11 standard.

0 commit comments

Comments
 (0)