aboutsummaryrefslogtreecommitdiff
path: root/testdata/Apply_test.txt
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/Apply_test.txt
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/Apply_test.txt')
-rw-r--r--testdata/Apply_test.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/testdata/Apply_test.txt b/testdata/Apply_test.txt
index 8107ee8..a8c3e6d 100644
--- a/testdata/Apply_test.txt
+++ b/testdata/Apply_test.txt
@@ -48,14 +48,16 @@ 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_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 = "^(//+|#+|/\\*+|<!--+)$"
+pattern = "^(//+|#+|/\\*+|<!--+|--+)?\\s*Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<(?<contact>.*)>.*$"
+delete_line_before = "^(//+|#+|/\\*+|<!--+|--+)$"
+delete_line_after = "^(//+|#+|\\*+/|--+>|--+)$"
>>> without_spdx_license_id.go
1