parameters: (comment, filename, linenum, error)
docstring: Checks for common mistakes in TODO comments.
  
    Args:
      comment: The text of the comment from the line in question.
      filename: The name of the current file.
      linenum: The number of the line to check.
      error: The function to call with any errors found.
docstring_summary: Checks for common mistakes in TODO comments.
docstring_tokens: Checks for common mistakes in TODO comments .
function: def CheckComment(comment, filename, linenum, error):
    """Checks for common mistakes in TODO comments.
  
    Args:
      comment: The text of the comment from the line in question.
      filename: The name of the current file.
      linenum: The number of the line to check.
      error: The function to call with any errors found.
    """
    match = _RE_PATTERN_TODO.match(comment)
    if match:
      # One whitespace is correct; zero whitespace is handled elsewhere.
      leading_whitespace = match.group(1)
      if len(leading_whitespace) > 1:
        error(filename, linenum, 'whitespace/todo', 2,
              'Too many spaces before TODO')
  
      username = match.group(2)
      if not username:
        error(filename, linenum, 'readability/todo', 2,
              'Missing username in TODO; it should look like '
              '"// TODO(my_username): Stuff."')
  
      middle_whitespace = match.group(3)
      # Comparisons made explicit for correctness -- pylint: disable=g-explicit-bool-comparison
      if middle_whitespace != ' ' and middle_whitespace != '':
        error(filename, linenum, 'whitespace/todo', 2,
              'TODO(my_username) should be followed by a space')
function_tokens: def CheckComment ( comment , filename , linenum , error ) : match = _RE_PATTERN_TODO . match ( comment ) if match : # One whitespace is correct; zero whitespace is handled elsewhere. leading_whitespace = match . group ( 1 ) if len ( leading_whitespace ) > 1 : error ( filename , linenum , 'whitespace/todo' , 2 , 'Too many spaces before TODO' ) username = match . group ( 2 ) if not username : error ( filename , linenum , 'readability/todo' , 2 , 'Missing username in TODO; it should look like ' '"// TODO(my_username): Stuff."' ) middle_whitespace = match . group ( 3 ) # Comparisons made explicit for correctness -- pylint: disable=g-explicit-bool-comparison if middle_whitespace != ' ' and middle_whitespace != '' : error ( filename , linenum , 'whitespace/todo' , 2 , 'TODO(my_username) should be followed by a space' )