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

Function collectArchivedIDs

apps/cli/internal/cli/validate.go:391–403  ·  view source on GitHub ↗

collectArchivedIDs scans archive directories and returns a set of task IDs found there.

(s *scanner.Scanner)

Source from the content-addressed store, hash-verified

389
390// collectArchivedIDs scans archive directories and returns a set of task IDs found there.
391func 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.
406func mergeValidationResults(target, source *validator.ValidationResult) {

Callers 3

runValidateFunction · 0.85
TestCollectArchivedIDsFunction · 0.85

Calls 1

ScanArchiveMethod · 0.80

Tested by 2

TestCollectArchivedIDsFunction · 0.68