checkTaskReferences returns an error if any other task references the given ID.
(taskID string, tasks []*model.Task)
| 111 | |
| 112 | // checkTaskReferences returns an error if any other task references the given ID. |
| 113 | func checkTaskReferences(taskID string, tasks []*model.Task) error { |
| 114 | refs := findReferencingTasks(taskID, tasks) |
| 115 | if len(refs) > 0 { |
| 116 | return fmt.Errorf("task %s is referenced by other tasks (use --force to delete anyway):\n%s", |
| 117 | taskID, formatReferencingTasks(refs)) |
| 118 | } |
| 119 | return nil |
| 120 | } |
| 121 | |
| 122 | // resolveRelPath returns the task file path relative to the scan directory. |
| 123 | func resolveRelPath(scanDir, filePath string) string { |
no test coverage detected