From 1dbd1e4c64a65c2f601cae42e63e6c5150c3acca Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sun, 11 Jan 2026 21:34:16 +0700 Subject: report: add SPDX identifiers to generated report This is to make all files generated by this program to be SPDX compliant. --- report.go | 6 ++++++ spdxconv_test.go | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/report.go b/report.go index 55e18d9..f229e81 100644 --- a/report.go +++ b/report.go @@ -138,6 +138,12 @@ func (rep *report) scan(conv *SPDXConv, listFile []string) (err error) { func (rep *report) write() (err error) { var buf bytes.Buffer + + // REUSE-IgnoreStart + buf.WriteString("// SPDX-License-Identifier: CC0-1.0\n") + buf.WriteString("// SPDX-FileCopyrightText: 2026 M. Shulhan \n\n") + // REUSE-IgnoreEnd + buf.WriteString(reportMetaPrefix + "version:v1\n") buf.WriteString(reportMetaPrefix + "header:path,license_id,idx_license_id,year,copyright_id,idx_copyright_id\n") diff --git a/spdxconv_test.go b/spdxconv_test.go index 0e3d635..68dca0f 100644 --- a/spdxconv_test.go +++ b/spdxconv_test.go @@ -42,7 +42,10 @@ func TestScan(t *testing.T) { t.Fatal(err) } - exp := `//spdxconv:version:v1 + exp := `// SPDX-License-Identifier: CC0-1.0 +// SPDX-FileCopyrightText: 2026 M. Shulhan + +//spdxconv:version:v1 //spdxconv:header:path,license_id,idx_license_id,year,copyright_id,idx_copyright_id //spdxconv:regular test.go,match,1,unknown,match,0,// , -- cgit v1.3