aboutsummaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-12 20:50:38 +0700
committerShulhan <ms@kilabit.info>2026-01-12 21:23:12 +0700
commit9817757f8dca159aa261315a91fceff1d9a13566 (patch)
treedd9ce0b3913e187b447c55518a01387fc059009d /testdata
parentbf35b0b8ab23f07c491e1c6b97c90b772942b7b7 (diff)
downloadspdxconv-9817757f8dca159aa261315a91fceff1d9a13566.tar.xz
all: add configuration for setting default copyright year
The `copyright_year` set the default year to be used in `SPDX-FileCopyrightText`. The year can be a single year (for example "2026"), range of year (for example, "2000-2026"), or list of year with comma separated (for example, "2000,2001,2026"); as long as there is no space in between.
Diffstat (limited to 'testdata')
-rw-r--r--testdata/Apply_test.txt7
-rw-r--r--testdata/scan/spdxconv.cfg1
2 files changed, 5 insertions, 3 deletions
diff --git a/testdata/Apply_test.txt b/testdata/Apply_test.txt
index 43360b4..611f654 100644
--- a/testdata/Apply_test.txt
+++ b/testdata/Apply_test.txt
@@ -9,6 +9,7 @@
[default]
license_identifier = GPL-3.0-only
+copyright_year = 2026
file_copyright_text = M. Shulhan <ms@kilabit.info>
[match-file-comment]
@@ -61,7 +62,7 @@ pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<
<<< without_spdx_license_id.go
// SPDX-License-Identifier: GPL-3.0-only
-// SPDX-FileCopyrightText: M. Shulhan <ms@kilabit.info>
+// SPDX-FileCopyrightText: 2026 M. Shulhan <ms@kilabit.info>
1
2
@@ -75,7 +76,7 @@ pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<
<<< with_spdx_at_bottom.go
// SPDX-License-Identifier: GPL-3.0-only
-// SPDX-FileCopyrightText: M. Shulhan <ms@kilabit.info>
+// SPDX-FileCopyrightText: 2026 M. Shulhan <ms@kilabit.info>
1
2
@@ -89,7 +90,7 @@ pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<
<<< with_spdx_license_id_only.go
// SPDX-License-Identifier: GPL-3.0-only
-// SPDX-FileCopyrightText: M. Shulhan <ms@kilabit.info>
+// SPDX-FileCopyrightText: 2026 M. Shulhan <ms@kilabit.info>
1
2
diff --git a/testdata/scan/spdxconv.cfg b/testdata/scan/spdxconv.cfg
index d317d64..59ae864 100644
--- a/testdata/scan/spdxconv.cfg
+++ b/testdata/scan/spdxconv.cfg
@@ -3,6 +3,7 @@
[default]
license_identifier = GPL-3.0-only
+copyright_year = 2026
file_copyright_text = Author <contact@email.local>
max_line_match = 10