Implemented an overlap detection module in the postprocessing chain
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user