aboutsummaryrefslogtreecommitdiff
path: root/testdata/loadConfig
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 /testdata/loadConfig
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 'testdata/loadConfig')
-rw-r--r--testdata/loadConfig/config_exists/spdxconv.cfg14
1 files changed, 7 insertions, 7 deletions
diff --git a/testdata/loadConfig/config_exists/spdxconv.cfg b/testdata/loadConfig/config_exists/spdxconv.cfg
index 1f7ff68..b92f0c8 100644
--- a/testdata/loadConfig/config_exists/spdxconv.cfg
+++ b/testdata/loadConfig/config_exists/spdxconv.cfg
@@ -43,13 +43,13 @@ prefix = "%"
pattern = "^.*\\.(apk|app|bz2|csv|doc|docx|exe|gif|gz|jpeg|jpg|json|pdf|png|ppt|pptx|svg|svgz|tar|tgz|xls|xlsx|zip)$"
[match-license]
-pattern = "^(//+|#+|/\\*+|<!--+)?\\s*(.*)governed by a BSD-style(.*)$"
+pattern = "^(//+|#+|/\\*+|<!--+|--+)?\\s*(.*)governed by a BSD-style(.*)$"
license_identifier = BSD-3-Clause
-delete_line_before = "^(//+|#+|/\\*+|<!--+)$"
-delete_line_after = "^(//+|#+|/\\*+|<!--+)?\\s*license that can(.*)$"
-delete_line_after = "^(//+|#+|\\*+/|--+>)$"
+delete_line_before = "^(//+|#+|/\\*+|<!--+|--+)$"
+delete_line_after = "^(//+|#+|/\\*+|<!--+|--+)?\\s*license that can(.*)$"
+delete_line_after = "^(//+|#+|\\*+/|--+>|--+)$"
[match-copyright]
-pattern = "^(//+|#+|/\\*+|<!--+)?\\s*Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<(?<contact>.*)>.*$"
-delete_line_before = "^(//+|#+|/\\*+|<!--+)$"
-delete_line_after = "^(//+|#+|\\*+/|--+>)$"
+pattern = "^(//+|#+|/\\*+|<!--+|--+)?\\s*Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<(?<contact>.*)>.*$"
+delete_line_before = "^(//+|#+|/\\*+|<!--+|--+)$"
+delete_line_after = "^(//+|#+|\\*+/|--+>|--+)$"