Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/blastradius/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func findBlastRadius(g *api.Graph, repoDir, target string, maxDepth int) ([]Resu
// Build reverse adjacency: nodeID → set of node IDs that import it.
importedBy := make(map[string][]string)
for _, rel := range g.Rels() {
if rel.Type == "IMPORTS" || rel.Type == "WILDCARD_IMPORTS" {
if rel.Type == "imports" || rel.Type == "wildcard_imports" {
importedBy[rel.EndNode] = append(importedBy[rel.EndNode], rel.StartNode)
}
}
Expand Down
4 changes: 2 additions & 2 deletions internal/blastradius/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func TestFindBlastRadius(t *testing.T) {
fileNode("c", "internal/c/c.go"),
},
Relationships: []api.Relationship{
{ID: "r1", Type: "IMPORTS", StartNode: "a", EndNode: "b"},
{ID: "r2", Type: "IMPORTS", StartNode: "c", EndNode: "a"},
{ID: "r1", Type: "imports", StartNode: "a", EndNode: "b"},
{ID: "r2", Type: "imports", StartNode: "c", EndNode: "a"},
},
}

Expand Down
2 changes: 1 addition & 1 deletion internal/deadcode/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func findDeadCode(g *api.Graph, includeExports bool) []Result {
// Build set of function node IDs that receive at least one CALLS edge.
called := make(map[string]bool)
for _, rel := range g.Rels() {
if rel.Type == "CALLS" || rel.Type == "CONTAINS_CALL" {
if rel.Type == "calls" || rel.Type == "contains_call" {
called[rel.EndNode] = true
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/deadcode/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func TestFindDeadCode(t *testing.T) {
node("f4", "Function", "Handler", "server.go"), // exported → excluded by default
},
Relationships: []api.Relationship{
{ID: "r1", Type: "CALLS", StartNode: "f2", EndNode: "f1"}, // main → process
{ID: "r1", Type: "calls", StartNode: "f2", EndNode: "f1"}, // main → process
},
}

Expand Down
4 changes: 2 additions & 2 deletions internal/focus/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func reachableImports(g *api.Graph, seedID string, nodeByID map[string]*api.Node
func functionNodesForFile(g *api.Graph, fileID string, rels []api.Relationship) []string {
var ids []string
for _, rel := range rels {
if (rel.Type == "DEFINES_FUNCTION" || rel.Type == "DEFINES") && rel.StartNode == fileID {
if (rel.Type == "defines_function" || rel.Type == "defines") && rel.StartNode == fileID {
ids = append(ids, rel.EndNode)
}
}
Expand All @@ -225,7 +225,7 @@ func functionNodesForFile(g *api.Graph, fileID string, rels []api.Relationship)
func buildCalleesOf(rels []api.Relationship) map[string][]string {
m := make(map[string][]string)
for _, rel := range rels {
if rel.Type == "CALLS" || rel.Type == "CONTAINS_CALL" {
if rel.Type == "calls" || rel.Type == "contains_call" {
m[rel.StartNode] = append(m[rel.StartNode], rel.EndNode)
}
}
Expand Down
4 changes: 2 additions & 2 deletions internal/mcp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ type deadFn struct{ name, file string }
func findDeadFunctions(g *api.Graph, includeExports bool) []deadFn {
called := make(map[string]bool)
for _, rel := range g.Rels() {
if rel.Type == "CALLS" || rel.Type == "CONTAINS_CALL" {
if rel.Type == "calls" || rel.Type == "contains_call" {
called[rel.EndNode] = true
}
}
Expand All @@ -366,7 +366,7 @@ type affected struct {
func findAffected(g *api.Graph, target string) []affected {
importedBy := make(map[string][]string)
for _, rel := range g.Rels() {
if rel.Type == "IMPORTS" || rel.Type == "WILDCARD_IMPORTS" {
if rel.Type == "imports" || rel.Type == "wildcard_imports" {
importedBy[rel.EndNode] = append(importedBy[rel.EndNode], rel.StartNode)
}
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-architecture/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func main() {

var violations []string
for _, rel := range graph.rels() {
if rel.Type != "IMPORTS" && rel.Type != "WILDCARD_IMPORTS" {
if rel.Type != "imports" && rel.Type != "wildcard_imports" {
continue
}
src := nodePackage[rel.StartNode]
Expand Down
Loading