third_party/blink/tools/blinkpy/style/checkers/cpp.py
def check_pass_ptr_usage(clean_lines, line_number, function_state, error):
    """Check for proper usage of Pass*Ptr.

    Currently this is limited to detecting declarations of Pass*Ptr
    variables inside of functions.

    Args:
      clean_lines: A CleansedLines instance containing the file.
      line_number: The number of the line to check.
      function_state: Current function name and lines in body so far.
      error: The function to call with any errors found.
    """
    if not function_state.in_a_function:
        return

    lines = clean_lines.lines
    line = lines[line_number]
    if line_number > function_state.body_start_position.row:
        matched_pass_ptr = match(r'^\s*Pass([A-Z][A-Za-z]*)Ptr<', line)
        if matched_pass_ptr:
            type_name = 'Pass%sPtr' % matched_pass_ptr.group(1)
            error(
                line_number, 'readability/pass_ptr', 5,
                'Local variables should never be %s (see '
                'http://webkit.org/coding/RefPtr.html).' % type_name)
Check for proper usage of Pass*Ptr.

    Currently this is limited to detecting declarations of Pass*Ptr
    variables inside of functions.

    Args:
      clean_lines: A CleansedLines instance containing the file.
      line_number: The number of the line to check.
      function_state: Current function name and lines in body so far.
      error: The function to call with any errors found.
    
Check for proper usage of Pass*Ptr.
Currently this is limited to detecting declarations of Pass*Ptr
variables inside of functions.
Check for proper usage of Pass * Ptr . Currently this is limited to detecting declarations of Pass * Ptr variables inside of functions .
def check_pass_ptr_usage(clean_lines, line_number, function_state, error):
    if not function_state.in_a_function:
        return
    lines = clean_lines.lines
    line = lines[line_number]
    if line_number > function_state.body_start_position.row:
        matched_pass_ptr = match(r'^\s*Pass([A-Z][A-Za-z]*)Ptr<', line)
        if matched_pass_ptr:
            type_name = 'Pass%sPtr' % matched_pass_ptr.group(1)
            error(
                line_number, 'readability/pass_ptr', 5,
                'Local variables should never be %s (see '
                'http://webkit.org/coding/RefPtr.html).' % type_name)
def check_pass_ptr_usage ( clean_lines , line_number , function_state , error ) : if not function_state . in_a_function : return lines = clean_lines . lines line = lines [ line_number ] if line_number > function_state . body_start_position . row : matched_pass_ptr = match ( r'^\s*Pass([A-Z][A-Za-z]*)Ptr<' , line ) if matched_pass_ptr : type_name = 'Pass%sPtr' % matched_pass_ptr . group ( 1 ) error ( line_number , 'readability/pass_ptr' , 5 , 'Local variables should never be %s (see ' 'http://webkit.org/coding/RefPtr.html).' % type_name )
Check for proper usage of Pass*Ptr.
Check for proper usage of Pass * Ptr .
"""Check for proper usage of Pass*Ptr.

    Currently this is limited to detecting declarations of Pass*Ptr
    variables inside of functions.

    Args:
      clean_lines: A CleansedLines instance containing the file.
      line_number: The number of the line to check.
      function_state: Current function name and lines in body so far.
      error: The function to call with any errors found.
    """
clean_lines
A CleansedLines instance containing the file.
A CleansedLines instance containing the file .
line_number
The number of the line to check.
The number of the line to check .
function_state
Current function name and lines in body so far.
Current function name and lines in body so far .
error
The function to call with any errors found.
The function to call with any errors found .