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

Classes

class  _CategoryFilter
 
class  FilterConfiguration
 

Functions

def validate_filter_rules (filter_rules, all_categories)
 

Function Documentation

◆ validate_filter_rules()

def webkitpy.style.filter.validate_filter_rules (   filter_rules,
  all_categories 
)
Validate the given filter rules, and raise a ValueError if not valid.

Args:
  filter_rules: A list of boolean filter rules, for example--
                ["-whitespace", "+whitespace/braces"]
  all_categories: A list of all available category names, for example--
                  ["whitespace/tabs", "whitespace/braces"]

Raises:
  ValueError: An error occurs if a filter rule does not begin
              with "+" or "-" or if a filter rule does not match
              the beginning of some category name in the list
              of all available categories.