collectArchivedIDs scans archive directories and returns a set of task IDs found there.
(s *scanner.Scanner)
| 389 | |
| 390 | // collectArchivedIDs scans archive directories and returns a set of task IDs found there. |
| 391 | func collectArchivedIDs(s *scanner.Scanner) map[string]bool { |
| 392 | archivedTasks, err := s.ScanArchive() |
| 393 | if err != nil || len(archivedTasks) == 0 { |
| 394 | return nil |
| 395 | } |
| 396 | ids := make(map[string]bool, len(archivedTasks)) |
| 397 | for _, t := range archivedTasks { |
| 398 | if t.ID != "" { |
| 399 | ids[t.ID] = true |
| 400 | } |
| 401 | } |
| 402 | return ids |
| 403 | } |
| 404 | |
| 405 | // mergeValidationResults appends issues from source into target and updates counters. |
| 406 | func mergeValidationResults(target, source *validator.ValidationResult) { |