third_party/blink/tools/blinkpy/style/checkers/cpp.py
def check(self, error, line_number):
        """Report if too many lines in function body.

        Args:
          error: The function to call with any errors found.
          line_number: The number of the line to check.
        """
        if match(r'T(EST|est)', self.current_function):
            base_trigger = self._TEST_TRIGGER
        else:
            base_trigger = self._NORMAL_TRIGGER
        trigger = base_trigger * 2**self.min_confidence

        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(
                line_number, '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.
          line_number: 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, line_number):
        if match(r'T(EST|est)', self.current_function):
            base_trigger = self._TEST_TRIGGER
        else:
            base_trigger = self._NORMAL_TRIGGER
        trigger = base_trigger * 2**self.min_confidence
        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(
                line_number, '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 , line_number ) : if match ( r'T(EST|est)' , self . current_function ) : base_trigger = self . _TEST_TRIGGER else : base_trigger = self . _NORMAL_TRIGGER trigger = base_trigger * 2 ** self . min_confidence 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 ( line_number , '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.
          line_number: 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 .
line_number
The number of the line to check.
The number of the line to check .