checkParentSelfReference warns if a task lists itself as parent
(tasks []*model.Task, result *ValidationResult)
| 325 | |
| 326 | // checkParentSelfReference warns if a task lists itself as parent |
| 327 | func (v *Validator) checkParentSelfReference(tasks []*model.Task, result *ValidationResult) { |
| 328 | for _, task := range tasks { |
| 329 | if task.Parent != "" && task.Parent == task.ID { |
| 330 | result.AddIssue(LevelWarning, task.ID, task.FilePath, |
| 331 | "task references itself as parent") |
| 332 | } |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | // checkParentCycles detects cycles in the parent chain (e.g. A→B→A) |
| 337 | func (v *Validator) checkParentCycles(tasks []*model.Task, taskMap map[string]*model.Task, result *ValidationResult) { |