(self, filepath)
| 164 | self.patterns.append(Pattern('!.dockerignore')) |
| 165 | |
| 166 | def matches(self, filepath): |
| 167 | matched = False |
| 168 | parent_path = os.path.dirname(filepath) |
| 169 | parent_path_dirs = split_path(parent_path) |
| 170 | |
| 171 | for pattern in self.patterns: |
| 172 | negative = pattern.exclusion |
| 173 | match = pattern.match(filepath) |
| 174 | if not match and parent_path != '': |
| 175 | if len(pattern.dirs) <= len(parent_path_dirs): |
| 176 | match = pattern.match( |
| 177 | os.path.sep.join(parent_path_dirs[:len(pattern.dirs)]) |
| 178 | ) |
| 179 | |
| 180 | if match: |
| 181 | matched = not negative |
| 182 | |
| 183 | return matched |
| 184 | |
| 185 | def walk(self, root): |
| 186 | def rec_walk(current_dir): |
no test coverage detected