MCPcopy Create free account
hub / github.com/JordanCoin/codemap / BuildFileGraph

Function BuildFileGraph

scanner/filegraph.go:32–39  ·  view source on GitHub ↗

BuildFileGraph analyzes a project and returns file-level dependencies Uses ast-grep for multi-language support with universal fuzzy resolution

(root string)

Source from the content-addressed store, hash-verified

30// BuildFileGraph analyzes a project and returns file-level dependencies
31// Uses ast-grep for multi-language support with universal fuzzy resolution
32func BuildFileGraph(root string) (*FileGraph, error) {
33 // Use ast-grep to extract imports for all languages.
34 analyses, err := ScanForDeps(root)
35 if err != nil {
36 return nil, err
37 }
38 return BuildFileGraphFromAnalyses(root, analyses)
39}
40
41// BuildFileGraphFromAnalyses builds the file graph from a pre-computed ast-grep
42// scan, letting callers that already hold the analyses avoid a redundant

Callers 12

buildImportersReportFunction · 0.92
dependencyContextForFileFunction · 0.92
DepgraphFunction · 0.92
getHubInfoWithFallbackFunction · 0.92
handleGetStructureFunction · 0.92
handleGetImportersFunction · 0.92
handleGetHubsFunction · 0.92
handleGetFileContextFunction · 0.92
computeDepsMethod · 0.92

Calls 2

ScanForDepsFunction · 0.85