@@ -6136,21 +6136,21 @@ def CheckRedundantVirtual(filename, clean_lines, linenum, error):
6136
6136
if end_col < 0 :
6137
6137
return # Couldn't find end of parameter list, give up
6138
6138
6139
- # # Look for "override" or "final" after the parameter list
6140
- # # (possibly on the next few lines).
6141
- # for i in xrange(end_line, min(end_line + 3, clean_lines.NumLines())):
6142
- # line = clean_lines.elided[i][end_col:]
6143
- # match = Search(r'\b(override|final)\b', line)
6144
- # if match:
6145
- # error(filename, linenum, 'readability/inheritance', 4,
6146
- # ('"virtual" is redundant since function is '
6147
- # 'already declared as "%s"' % match.group(1)))
6148
- #
6149
- # # Set end_col to check whole lines after we are done with the
6150
- # # first line.
6151
- # end_col = 0
6152
- # if Search(r'[^\w]\s*$', line):
6153
- # break
6139
+ # Look for "override" or "final" after the parameter list
6140
+ # (possibly on the next few lines).
6141
+ for i in xrange (end_line , min (end_line + 3 , clean_lines .NumLines ())):
6142
+ line = clean_lines .elided [i ][end_col :]
6143
+ match = Search (r'\b(override|final)\b' , line )
6144
+ if match :
6145
+ error (filename , linenum , 'readability/inheritance' , 4 ,
6146
+ ('"virtual" is redundant since function is '
6147
+ 'already declared as "%s"' % match .group (1 )))
6148
+
6149
+ # Set end_col to check whole lines after we are done with the
6150
+ # first line.
6151
+ end_col = 0
6152
+ if Search (r'[^\w]\s*$' , line ):
6153
+ break
6154
6154
6155
6155
6156
6156
0 commit comments