wpiformat/wpiformat/cpplint.py
def Check(self, error, filename, linenum):
    """Report if too many lines in function body.

    Args:
      error: The function to call with any errors found.
      filename: The name of the current file.
      linenum: The number of the line to check.
    """
    if not self.in_a_function:
      return

    if Match(r'T(EST|est)', self.current_function):
      base_trigger = self._TEST_TRIGGER
    else:
      base_trigger = self._NORMAL_TRIGGER
    trigger = base_trigger * 2

    if self.lines_in_function > trigger:
      error_level = int(math.log(self.lines_in_function / base_trigger, 2))
      # 50 => 0, 100 => 1, 200 => 2, 400 => 3, 800 => 4, 1600 => 5, ...
      if error_level > 5:
        error_level = 5
      error(filename, linenum, 'readability/fn_size', error_level,
            'Small and focused functions are preferred:'
            ' %s has %d non-comment lines'
            ' (error triggered by exceeding %d lines).'  % (
                self.current_function, self.lines_in_function, trigger))
Report if too many lines in function body.

    Args:
      error: The function to call with any errors found.
      filename: The name of the current file.
      linenum: The number of the line to check.
    
Report if too many lines in function body.
Report if too many lines in function body .
def Check(self, error, filename, linenum):
    if not self.in_a_function:
      return
    if Match(r'T(EST|est)', self.current_function):
      base_trigger = self._TEST_TRIGGER
    else:
      base_trigger = self._NORMAL_TRIGGER
    trigger = base_trigger * 2
    if self.lines_in_function > trigger:
      error_level = int(math.log(self.lines_in_function / base_trigger, 2))
      if error_level > 5:
        error_level = 5
      error(filename, linenum, 'readability/fn_size', error_level,
            'Small and focused functions are preferred:'
            ' %s has %d non-comment lines'
            ' (error triggered by exceeding %d lines).'  % (
                self.current_function, self.lines_in_function, trigger))
def Check ( self , error , filename , linenum ) : if not self . in_a_function : return if Match ( r'T(EST|est)' , self . current_function ) : base_trigger = self . _TEST_TRIGGER else : base_trigger = self . _NORMAL_TRIGGER trigger = base_trigger * 2 if self . lines_in_function > trigger : error_level = int ( math . log ( self . lines_in_function / base_trigger , 2 ) ) if error_level > 5 : error_level = 5 error ( filename , linenum , 'readability/fn_size' , error_level , 'Small and focused functions are preferred:' ' %s has %d non-comment lines' ' (error triggered by exceeding %d lines).' % ( self . current_function , self . lines_in_function , trigger ) )
Report if too many lines in function body.
Report if too many lines in function body .
"""Report if too many lines in function body.

    Args:
      error: The function to call with any errors found.
      filename: The name of the current file.
      linenum: The number of the line to check.
    """ # 50 => 0, 100 => 1, 200 => 2, 400 => 3, 800 => 4, 1600 => 5, ...
self
error
The function to call with any errors found.
The function to call with any errors found .
filename
The name of the current file.
The name of the current file .
linenum
The number of the line to check.
The number of the line to check .