aboutsummaryrefslogtreecommitdiff
path: root/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'file.go')
-rw-r--r--file.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/file.go b/file.go
index 7849d9e..798790c 100644
--- a/file.go
+++ b/file.go
@@ -187,18 +187,20 @@ func (f *file) scanCopyrightText(conv *SPDXConv) {
}
if cmc.match(string(line)) {
f.idxCopyrightText = x
+ f.copyrightYear = cmc.year
f.copyrightText = valMatch
return
}
}
for x, line := range f.bottomLines {
- if reLicenseID.Match(line) {
+ if reCopyrightText.Match(line) {
f.idxCopyrightText = x - conv.cfg.MaxLineMatch
f.copyrightText = valExist
return
}
if cmc.match(string(line)) {
f.idxCopyrightText = x - conv.cfg.MaxLineMatch
+ f.copyrightYear = cmc.year
f.copyrightText = valMatch
return
}