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

Public Member Functions

def __init__ (self, all_categories, default_options, base_filter_rules=None, mock_stderr=None, usage=None)
 
def parse (self, args)
 

Public Attributes

 default_options
 
 stderr_write
 

Detailed Description

Supports the parsing of check-webkit-style command arguments.

Attributes:
  create_usage: A function that accepts a DefaultCommandOptionValues
                instance and returns a string of usage instructions.
                Defaults to the function that generates the usage
                string for check-webkit-style.
  default_options: A DefaultCommandOptionValues instance that provides
                   the default values for options not explicitly
                   provided by the user.
  stderr_write: A function that takes a string as a parameter and
                serves as stderr.write.  Defaults to sys.stderr.write.
                This parameter should be specified only for unit tests.

Constructor & Destructor Documentation

◆ __init__()

def webkitpy.style.optparser.ArgumentParser.__init__ (   self,
  all_categories,
  default_options,
  base_filter_rules = None,
  mock_stderr = None,
  usage = None 
)
Create an ArgumentParser instance.

Args:
  all_categories: The set of all available style categories.
  default_options: See the corresponding attribute in the class
           docstring.
Keyword Args:
  base_filter_rules: The list of filter rules at the beginning of
             the list of rules used to check style.  This
             list has the least precedence when checking
             style and precedes any user-provided rules.
             The class uses this parameter only for display
             purposes to the user.  Defaults to the empty list.
  create_usage: See the documentation of the corresponding
        attribute in the class docstring.
  stderr_write: See the documentation of the corresponding
        attribute in the class docstring.

Member Function Documentation

◆ parse()

def webkitpy.style.optparser.ArgumentParser.parse (   self,
  args 
)
Parse the command line arguments to check-webkit-style.

Args:
  args: A list of command-line arguments as returned by sys.argv[1:].

Returns:
  A tuple of (paths, options)

  paths: The list of paths to check.
  options: A CommandOptionValues instance.

Member Data Documentation

◆ default_options

webkitpy.style.optparser.ArgumentParser.default_options

◆ stderr_write

webkitpy.style.optparser.ArgumentParser.stderr_write

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