webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Functions
webkitpy.style.main Namespace Reference

Classes

class  CheckWebKitStyle
 

Functions

def change_directory (filesystem, checkout_root, paths)
 

Function Documentation

◆ change_directory()

def webkitpy.style.main.change_directory (   filesystem,
  checkout_root,
  paths 
)
Change the working directory to the WebKit checkout root, if possible.

If every path in the paths parameter is below the checkout root (or if
the paths parameter is empty or None), this method changes the current
working directory to the checkout root and converts the paths parameter
as described below.
    This allows the paths being checked to be displayed relative to the
checkout root, and for path-specific style checks to work as expected.
Path-specific checks include whether files should be skipped, whether
custom style rules should apply to certain files, etc.

Returns:
  paths: A copy of the paths parameter -- possibly converted, as follows.
         If this method changed the current working directory to the
         checkout root, then the list is the paths parameter converted to
         normalized paths relative to the checkout root.

Args:
  paths: A list of paths to the files that should be checked for style.
         This argument can be None or the empty list if a git commit
         or all changes under the checkout root should be checked.
  checkout_root: The path to the root of the WebKit checkout.