Lines Matching full:rules
19 from rules import Rule, Rules
35 # Optionally discard rules from parent directories, similar to "noparent" in
37 # it will not inherit rules from //ash/DEPS, forcing each //ash/component/foo
48 """Returns a path normalized to how we write DEPS rules and compare paths."""
99 ignore_temp_rules: Ignore rules that start with Rule.TEMP_ALLOW ("!").
119 # Map of normalized directory paths to rules to use for those
123 self._ApplyDirectoryRulesAndSkipSubdirs(Rules(), self.base_directory)
127 """Applies the given include rules, returning the new rules.
130 existing_rules: A set of existing rules that will be combined.
131 include: The list of rules from the "include_rules" section of DEPS.
132 specific_includes: E.g. {'.*_unittest\.cc': ['+foo', '-blat']} rules
137 Returns: A new set of rules combining the existing_rules with the other
140 rules = copy.deepcopy(existing_rules)
153 rules.AddRule('+' + relative_dir,
159 adds the rule with its description to |rules|.
161 If we are ignoring temporary rules, this function does nothing
162 for rules beginning with the Rule.TEMP_ALLOW character.
174 rules.AddRule(rule_str, relative_dir, rule_description, dependee_regexp)
176 # Apply the additional explicit rules.
180 # Finally, apply the specific rules.
182 return rules
188 return rules
191 """Combines rules from the existing rules and the new directory.
195 additional include rules and implicit rules for the given directory, to
196 come up with a combined set of rules to apply for the directory.
199 existing_rules: The rules for the parent directory. We'll add-on to these.
202 implicit rules. This is a local path.
205 (1) the combined set of rules to apply to the sub-tree,
214 print('Applying rules from', dir_path_local_abs)
269 parent_rules = Rules()
280 directory that owns the |parent_rules|, add |dir_path_local_abs|'s rules to
293 """Yields (rules, filenames) for each repository directory with DEPS rules.
300 Two-element (rules, filenames) tuples. |rules| is a rules.Rules object
345 """Returns a Rules object to use for the given directory, or None
348 Also modifies |self.directory_rules| to store the Rules.
349 This takes care of first building rules for parent directories (up to
350 |self.base_directory|) if needed, which may add rules for skipped
354 dir_path_local: A local path to the directory you want rules for.