MCPcopy Create free account
hub / github.com/driangle/taskmd / markCriticalPathDependencies

Function markCriticalPathDependencies

apps/cli/internal/cli/snapshot_analysis.go:161–179  ·  view source on GitHub ↗

markCriticalPathDependencies recursively marks dependencies on critical path

(
	taskID string,
	taskMap map[string]*model.Task,
	depthMap map[string]int,
	targetDepth int,
	criticalPath map[string]bool,
)

Source from the content-addressed store, hash-verified

159
160// markCriticalPathDependencies recursively marks dependencies on critical path
161func markCriticalPathDependencies(
162 taskID string,
163 taskMap map[string]*model.Task,
164 depthMap map[string]int,
165 targetDepth int,
166 criticalPath map[string]bool,
167) {
168 task, exists := taskMap[taskID]
169 if !exists {
170 return
171 }
172
173 for _, depID := range task.Dependencies {
174 if depthMap[depID] == targetDepth-1 {
175 criticalPath[depID] = true
176 markCriticalPathDependencies(depID, taskMap, depthMap, targetDepth-1, criticalPath)
177 }
178 }
179}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected