(source)
| 266 | r"(?P<name>[\w\d./\\]+[.]src)['\"]", re.I) |
| 267 | |
| 268 | def resolve_includes(source): |
| 269 | d = os.path.dirname(source) |
| 270 | with open(source) as fid: |
| 271 | lines = [] |
| 272 | for line in fid: |
| 273 | m = include_src_re.match(line) |
| 274 | if m: |
| 275 | fn = m.group('name') |
| 276 | if not os.path.isabs(fn): |
| 277 | fn = os.path.join(d, fn) |
| 278 | if os.path.isfile(fn): |
| 279 | lines.extend(resolve_includes(fn)) |
| 280 | else: |
| 281 | lines.append(line) |
| 282 | else: |
| 283 | lines.append(line) |
| 284 | return lines |
| 285 | |
| 286 | def process_file(source): |
| 287 | lines = resolve_includes(source) |
no test coverage detected
searching dependent graphs…