aboutsummaryrefslogtreecommitdiff
path: root/report_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-13 21:08:26 +0700
committerShulhan <ms@kilabit.info>2026-01-14 04:10:44 +0700
commita2bfa5ec9539f9063e33519e245ae00193783750 (patch)
treedd15bf22d9b7df7b2079103fbd248c0eb717b59e /report_test.go
parent3bc8f7ea570c726d88f4e0d31910b9eec999ce46 (diff)
downloadspdxconv-a2bfa5ec9539f9063e33519e245ae00193783750.tar.xz
all: get the copyright year from git history
If the line that match with pattern on match-copyright does not contains year, or there is no match, try to get the year from the first commit of the file using "git log --follow ..." command. If no commit history or its not using git, use default copyright year from configuration.
Diffstat (limited to 'report_test.go')
-rw-r--r--report_test.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/report_test.go b/report_test.go
index db43739..2b31436 100644
--- a/report_test.go
+++ b/report_test.go
@@ -21,7 +21,6 @@ func TestLoadReport(t *testing.T) {
listRegular: []*file{{
path: `fileR1`,
licenseID: valDefault,
- copyrightYear: valUnknown,
copyrightText: valDefault,
commentPrefix: `# `,
}, {
@@ -45,14 +44,12 @@ func TestLoadReport(t *testing.T) {
listBinary: []*file{{
path: `fileB1`,
licenseID: valDefault,
- copyrightYear: valUnknown,
copyrightText: valDefault,
isBinary: true,
}},
listUnknown: []*file{{
path: `fileU1`,
licenseID: valDefault,
- copyrightYear: valUnknown,
copyrightText: valDefault,
isUnknown: true,
}},