Lines Matching refs:rule
13 """Specifies a single rule for an include, which can be one of
17 # These are the prefixes used to indicate each type of rule. These
19 # rule this is.
34 """Returns a tuple (allow, dependent dir, dependee dir) for this rule,
42 of the current rule. For example, the input "foo" would match "foo/bar"."""
46 """Returns true if the input string would be covered by this rule. For
47 example, the input "foo/bar" would match the rule "foo"."""
52 """A rule that has a simple message as the reason for failing,
65 """Returns a tuple of a character indicating what type of rule this
66 is, and a string holding the path the rule applies to.
69 raise Exception('The rule string "%s" is empty\nin %s' %
74 'The rule string "%s" does not begin with a "+", "-" or "!".' %
82 'The rule string "%s" ends with a "/" which is not allowed.'
99 """Initializes the current rules with an empty rule list for all
126 for rule in rules:
127 (allow, dependent, dependee) = rule.AsDependencyTuple()
140 """Adds a rule for the given rule string.
146 dependent_dir: The directory to which this rule applies.
147 dependee_regexp: The rule will only be applied to dependee files
174 """Returns the rule that applies to |include_path| for a dependee
180 for rule in specific_rules:
181 if rule.ChildOrMatch(include_path):
182 return rule
183 for rule in self._general_rules:
184 if rule.ChildOrMatch(include_path):
185 return rule
186 return MessageRule('no rule applying.')