webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | Public Attributes | List of all members
webkitpy.style.checker.StyleProcessor Class Reference
Inheritance diagram for webkitpy.style.checker.StyleProcessor:
webkitpy.style.checker.ProcessorBase

Public Member Functions

def __init__ (self, configuration, mock_dispatcher=None, mock_increment_error_count=None, mock_carriage_checker_class=None)
 
def should_process (self, file_path)
 
def process (self, lines, file_path, line_numbers=None)
 
- Public Member Functions inherited from webkitpy.style.checker.ProcessorBase
def should_process (self, file_path)
 
def process (self, lines, file_path, kwargs)
 

Public Attributes

 error_count
 

Detailed Description

A ProcessorBase for checking style.

Attributes:
  error_count: An integer that is the total number of reported
               errors for the lifetime of this instance.

Constructor & Destructor Documentation

◆ __init__()

def webkitpy.style.checker.StyleProcessor.__init__ (   self,
  configuration,
  mock_dispatcher = None,
  mock_increment_error_count = None,
  mock_carriage_checker_class = None 
)
Create an instance.

Args:
  configuration: A StyleProcessorConfiguration instance.
  mock_dispatcher: A mock CheckerDispatcher instance.  This
           parameter is for unit testing.  Defaults to a
           CheckerDispatcher instance.
  mock_increment_error_count: A mock error-count incrementer.
  mock_carriage_checker_class: A mock class for checking and
                       transforming carriage returns.
                       This parameter is for unit testing.
                       Defaults to CarriageReturnChecker.

Member Function Documentation

◆ process()

def webkitpy.style.checker.StyleProcessor.process (   self,
  lines,
  file_path,
  line_numbers = None 
)
Check the given lines for style.

Arguments:
  lines: A list of all lines in the file to check.
  file_path: The path of the file to process.  If possible, the path
     should be relative to the source root.  Otherwise,
     path-specific logic may not behave as expected.
  line_numbers: A list of line numbers of the lines for which
        style errors should be reported, or None if errors
        for all lines should be reported.  When not None, this
        list normally contains the line numbers corresponding
        to the modified lines of a patch.

◆ should_process()

def webkitpy.style.checker.StyleProcessor.should_process (   self,
  file_path 
)
Return whether the file should be checked for style.

Member Data Documentation

◆ error_count

webkitpy.style.checker.StyleProcessor.error_count

The documentation for this class was generated from the following file: