def ProcessFileData(filename, file_extension, lines, error, extra_check_functions=[]):
 lines = ((['// marker so line numbers and indices both start at 1'] + lines) + ['// marker so line numbers end in a known way'])
 include_state = _IncludeState()
 function_state = _FunctionState()
 nesting_state = _NestingState()
 ResetNolintSuppressions()
 CheckForCopyright(filename, lines, error)
 if (file_extension == 'h'):
  CheckForHeaderGuard(filename, lines, error)
 RemoveMultiLineComments(filename, lines, error)
 clean_lines = CleansedLines(lines)
 for line in xrange(clean_lines.NumLines()):
  ProcessLine(filename, file_extension, clean_lines, line, include_state, function_state, nesting_state, error, extra_check_functions)
 nesting_state.CheckCompletedBlocks(filename, error)
 CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error)
 CheckForBadCharacters(filename, lines, error)
 CheckForNewlineAtEOF(filename, lines, error)

def ProcessFileData ( filename , file_extension , lines , error , extra_check_functions = [ ] ) : lines = ( ( [ '// marker so line numbers and indices both start at 1' ] + lines ) + [ '// marker so line numbers end in a known way' ] ) include_state = _IncludeState ( ) function_state = _FunctionState ( ) nesting_state = _NestingState ( ) ResetNolintSuppressions ( ) CheckForCopyright ( filename , lines , error ) if ( file_extension == 'h' ) : CheckForHeaderGuard ( filename , lines , error ) RemoveMultiLineComments ( filename , lines , error ) clean_lines = CleansedLines ( lines ) for line in xrange ( clean_lines . NumLines ( ) ) : ProcessLine ( filename , file_extension , clean_lines , line , include_state , function_state , nesting_state , error , extra_check_functions ) nesting_state . CheckCompletedBlocks ( filename , error ) CheckForIncludeWhatYouUse ( filename , clean_lines , include_state , error ) CheckForBadCharacters ( filename , lines , error ) CheckForNewlineAtEOF ( filename , lines , error )
performs lint checks and reports any errors to the given error function .