Build a dict that maps include files to paths
(path)
| 10 | |
| 11 | |
| 12 | def IncludesToPaths(path): |
| 13 | """Build a dict that maps include files to paths""" |
| 14 | |
| 15 | includeToPath = dict() |
| 16 | prog = re.compile(r"(itk.*\.h)") |
| 17 | for root, dirs, files in os.walk(path): |
| 18 | for f in files: |
| 19 | if prog.match(f): |
| 20 | includeFile = prog.findall(f)[0] |
| 21 | parts = root.split("/") |
| 22 | module = parts[len(parts) - 3] + parts[len(parts) - 2] |
| 23 | includeToPath[includeFile] = module |
| 24 | return includeToPath |
| 25 | |
| 26 | |
| 27 | def FindModules(path): |
no outgoing calls
no test coverage detected