@@ -3072,36 +3072,6 @@ def CheckComment(line, filename, linenum, next_line_start, error):
30723072 'Should have a space between // and comment' )
30733073
30743074
3075- def CheckAccess (filename , clean_lines , linenum , nesting_state , error ):
3076- """Checks for improper use of DISALLOW* macros.
3077-
3078- Args:
3079- filename: The name of the current file.
3080- clean_lines: A CleansedLines instance containing the file.
3081- linenum: The number of the line to check.
3082- nesting_state: A NestingState instance which maintains information about
3083- the current stack of nested blocks being parsed.
3084- error: The function to call with any errors found.
3085- """
3086- line = clean_lines .elided [linenum ] # get rid of comments and strings
3087-
3088- matched = Match ((r'\s*(DISALLOW_COPY_AND_ASSIGN|'
3089- r'DISALLOW_IMPLICIT_CONSTRUCTORS)' ), line )
3090- if not matched :
3091- return
3092- if nesting_state .stack and isinstance (nesting_state .stack [- 1 ], _ClassInfo ):
3093- if nesting_state .stack [- 1 ].access != 'private' :
3094- error (filename , linenum , 'readability/constructors' , 3 ,
3095- '%s must be in the private: section' % matched .group (1 ))
3096-
3097- else :
3098- # Found DISALLOW* macro outside a class declaration, or perhaps it
3099- # was used inside a function when it should have been part of the
3100- # class declaration. We could issue a warning here, but it
3101- # probably resulted in a compiler error already.
3102- pass
3103-
3104-
31053075def CheckSpacing (filename , clean_lines , linenum , nesting_state , error ):
31063076 """Checks for the correctness of various spacing issues in the code.
31073077
@@ -4338,7 +4308,6 @@ def CheckStyle(filename, clean_lines, linenum, file_extension, nesting_state,
43384308 CheckBraces (filename , clean_lines , linenum , error )
43394309 CheckTrailingSemicolon (filename , clean_lines , linenum , error )
43404310 CheckEmptyBlockBody (filename , clean_lines , linenum , error )
4341- CheckAccess (filename , clean_lines , linenum , nesting_state , error )
43424311 CheckSpacing (filename , clean_lines , linenum , nesting_state , error )
43434312 CheckOperatorSpacing (filename , clean_lines , linenum , error )
43444313 CheckParenthesisSpacing (filename , clean_lines , linenum , error )
0 commit comments