Implemented an overlap detection module in the postprocessing chain

This commit is contained in:
2026-04-26 20:39:49 -05:00
parent f9ca80f2e8
commit e42a2326e8
8 changed files with 464 additions and 4 deletions

View File

@@ -137,6 +137,7 @@ func normalizeInputFiles(paths []string) ([]string, error) {
}
normalized := make([]string, 0, len(paths))
seen := make(map[string]struct{}, len(paths))
for _, path := range paths {
path = strings.TrimSpace(path)
if path == "" {
@@ -147,6 +148,10 @@ func normalizeInputFiles(paths []string) ([]string, error) {
if err := requireFile(clean, "--input-file"); err != nil {
return nil, err
}
if _, exists := seen[clean]; exists {
return nil, fmt.Errorf("duplicate --input-file %q", clean)
}
seen[clean] = struct{}{}
normalized = append(normalized, clean)
}
sort.Strings(normalized)