parameters: (filename, clean_lines, linenum, error)
docstring: Checks the use of CHECK and EXPECT macros.
  
    Args:
      filename: The name of the current file.
      clean_lines: A CleansedLines instance containing the file.
      linenum: The number of the line to check.
      error: The function to call with any errors found.
docstring_summary: Checks the use of CHECK and EXPECT macros.
docstring_tokens: Checks the use of CHECK and EXPECT macros .
function: def CheckCheck(filename, clean_lines, linenum, error):
    """Checks the use of CHECK and EXPECT macros.
  
    Args:
      filename: The name of the current file.
      clean_lines: A CleansedLines instance containing the file.
      linenum: The number of the line to check.
      error: The function to call with any errors found.
    """
  
    # Decide the set of replacement macros that should be suggested
    raw_lines = clean_lines.raw_lines
    current_macro = ''
    for macro in _CHECK_MACROS:
      if raw_lines[linenum].find(macro) >= 0:
        current_macro = macro
        break
    if not current_macro:
      # Don't waste time here if line doesn't contain 'CHECK' or 'EXPECT'
      return
  
    line = clean_lines.elided[linenum]        # get rid of comments and strings
  
    # Encourage replacing plain CHECKs with CHECK_EQ/CHECK_NE/etc.
    for operator in ['==', '!=', '>=', '>', '<=', '<']:
      if ReplaceableCheck(operator, current_macro, line):
        error(filename, linenum, 'readability/check', 2,
              'Consider using %s instead of %s(a %s b)' % (
                  _CHECK_REPLACEMENT[current_macro][operator],
                  current_macro, operator))
        break
function_tokens: def CheckCheck ( filename , clean_lines , linenum , error ) : # Decide the set of replacement macros that should be suggested raw_lines = clean_lines . raw_lines current_macro = '' for macro in _CHECK_MACROS : if raw_lines [ linenum ] . find ( macro ) >= 0 : current_macro = macro break if not current_macro : # Don't waste time here if line doesn't contain 'CHECK' or 'EXPECT' return line = clean_lines . elided [ linenum ] # get rid of comments and strings # Encourage replacing plain CHECKs with CHECK_EQ/CHECK_NE/etc. for operator in [ '==' , '!=' , '>=' , '>' , '<=' , '<' ] : if ReplaceableCheck ( operator , current_macro , line ) : error ( filename , linenum , 'readability/check' , 2 , 'Consider using %s instead of %s(a %s b)' % ( _CHECK_REPLACEMENT [ current_macro ] [ operator ] , current_macro , operator ) ) break