Walk the ``codebase`` starting at ``resource`` and stop when ``skip_name`` is found in a subdirectory. The idea is to avoid walking recursively sub- directories that contain a build script such as a Bazel or BUCK file as they define their own file tree.
(resource, codebase, skip_name)
| 224 | |
| 225 | |
| 226 | def walk_build(resource, codebase, skip_name): |
| 227 | """ |
| 228 | Walk the ``codebase`` starting at ``resource`` and stop when ``skip_name`` |
| 229 | is found in a subdirectory. The idea is to avoid walking recursively sub- |
| 230 | directories that contain a build script such as a Bazel or BUCK file as they |
| 231 | define their own file tree. |
| 232 | """ |
| 233 | for child in resource.children(codebase): |
| 234 | yield child |
| 235 | if not child.is_dir: |
| 236 | continue |
| 237 | if not any(r.name == skip_name for r in child.children(codebase)): |
| 238 | for subchild in walk_build(child, codebase, skip_name=skip_name): |
| 239 | yield subchild |
| 240 | |
| 241 | |
| 242 | def get_license_detections_and_expression(package, resource, codebase): |
no test coverage detected