* Every ordered pair of files where one imports the other, once each: the * graph circular imports are read from. See `src/graph/file-cycles.ts`. * * Only `imports` edges, which the import resolver made from a statement in * the file. Every other cross-file edge says something ran or was
()
| 3500 | * and the files of one Go package call each other freely. |
| 3501 | */ |
| 3502 | getFileImportPairs(): Array<{ source: string; target: string }> { |
| 3503 | return this.db |
| 3504 | .prepare( |
| 3505 | `SELECT DISTINCT sn.file_path AS source, tn.file_path AS target |
| 3506 | FROM edges e |
| 3507 | JOIN nodes sn ON sn.id = e.source |
| 3508 | JOIN nodes tn ON tn.id = e.target |
| 3509 | WHERE e.kind = 'imports' |
| 3510 | AND sn.file_path <> tn.file_path` |
| 3511 | ) |
| 3512 | .all() as Array<{ source: string; target: string }>; |
| 3513 | } |
| 3514 | |
| 3515 | /** |
| 3516 | * Every unresolved reference recorded in one FILE, ordered by line. |
no test coverage detected