Collects and returns all rules from root path recursively.
(root_path)
| 109 | |
| 110 | |
| 111 | def collect_rules(root_path): |
| 112 | """Collects and returns all rules from root path recursively.""" |
| 113 | rules = [] |
| 114 | for cur, _, _ in os.walk(root_path): |
| 115 | build_path = os.path.join(cur, "BUILD.bazel") |
| 116 | if os.path.exists(build_path): |
| 117 | rules.extend(read_build("//" + cur)) |
| 118 | return rules |
| 119 | |
| 120 | |
| 121 | def relevant_rule(rule): |