summaryrefslogtreecommitdiff
path: root/internal/engine/match.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/engine/match.go')
-rw-r--r--internal/engine/match.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/engine/match.go b/internal/engine/match.go
index 59cea42..25c05e5 100644
--- a/internal/engine/match.go
+++ b/internal/engine/match.go
@@ -46,6 +46,13 @@ type FileMatch struct {
// directory's rules use, or that check failed. Only set for a file some
// matching rule would delete.
NoDelete string
+
+ // DuplicateOf is the file a (duplicate) test matched this one against,
+ // absolute; "" when none did. The reason text says the same thing the
+ // way it reads best - relative to the directory when it is inside it -
+ // which leaves a front end no way to act on the other copy, or even to
+ // say where it is (his report, 2026-09-17).
+ DuplicateOf string
}
// Result is everything Match found in one directory.
@@ -190,6 +197,7 @@ func evalFile(run *matchRun, file scan.File) FileMatch {
if len(run.d.DupScopes) > 0 && deletes(fm.Rules) {
fm.NoDelete = noDelete(f, run.d.DupScopes)
}
+ fm.DuplicateOf = f.DuplicateOriginal()
return fm
}