aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-11 21:34:16 +0700
committerShulhan <ms@kilabit.info>2026-01-11 21:43:05 +0700
commit1dbd1e4c64a65c2f601cae42e63e6c5150c3acca (patch)
tree36cbbcc2dd98de0d5e5c1af800d8c9b288f2c626
parent069380e6b34d36ca2ace9c0d7e2ec4efdc4a2736 (diff)
downloadspdxconv-1dbd1e4c64a65c2f601cae42e63e6c5150c3acca.tar.xz
report: add SPDX identifiers to generated report
This is to make all files generated by this program to be SPDX compliant.
-rw-r--r--report.go6
-rw-r--r--spdxconv_test.go5
2 files changed, 10 insertions, 1 deletions
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 <ms@kilabit.info>\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 <ms@kilabit.info>
+
+//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,// ,