@@ -505,19 +505,19 @@ func buildFlatCallHierarchy(db *sqlite.Conn, rootSymbol string, maxDepth int) ([
505505
506506 // Create new entry
507507 entry = & FlatCallHierarchyEntry {
508- Callee : current .symbol ,
509- Caller : CallerInfo {
510- Symbol : ref .CallerSymbol ,
511- RelativePath : ref .FilePath ,
512- Range : Range {
513- StartLine : callerLocation .Line ,
514- StartChar : callerLocation .Character ,
515- EndLine : callerLocation .EndLine ,
516- EndChar : callerLocation .EndChar ,
517- },
508+ Callee : current .symbol ,
509+ Caller : CallerInfo {
510+ Symbol : ref .CallerSymbol ,
511+ RelativePath : ref .FilePath ,
512+ Range : Range {
513+ StartLine : callerLocation .Line ,
514+ StartChar : callerLocation .Character ,
515+ EndLine : callerLocation .EndLine ,
516+ EndChar : callerLocation .EndChar ,
518517 },
519- CallSites : []CallSite {},
520- }
518+ },
519+ CallSites : []CallSite {},
520+ }
521521
522522 relationshipMap [pair ] = entry
523523 }
@@ -544,17 +544,17 @@ func buildFlatCallHierarchy(db *sqlite.Conn, rootSymbol string, maxDepth int) ([
544544 // Convert map to slice and sort in BFS order
545545 // Track the symbols in BFS order to ensure proper ordering
546546 orderedSymbols := []string {rootSymbol } // Start with root symbol
547-
547+
548548 // Add remaining symbols in the order they were discovered
549549 for i := 0 ; i < len (orderedSymbols ); i ++ {
550550 symbol := orderedSymbols [i ]
551-
551+
552552 // First, add entries where this symbol is the callee
553553 for pair , entry := range relationshipMap {
554554 // Caller filtering (for method/function symbols) is done in SQL
555555 if pair .callee == symbol {
556556 result = append (result , * entry )
557-
557+
558558 // Add caller to ordered symbols if not already there
559559 alreadyAdded := false
560560 for _ , s := range orderedSymbols {
@@ -563,14 +563,14 @@ func buildFlatCallHierarchy(db *sqlite.Conn, rootSymbol string, maxDepth int) ([
563563 break
564564 }
565565 }
566-
566+
567567 if ! alreadyAdded {
568568 orderedSymbols = append (orderedSymbols , pair .caller )
569569 }
570570 }
571571 }
572572 }
573-
573+
574574 return result , nil
575575}
576576
0 commit comments