aboutsummaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-13 01:44:23 +0700
committerShulhan <ms@kilabit.info>2026-01-13 01:45:18 +0700
commit434139fe3918fdb56704558301ad9275f1da06ad (patch)
tree76f4a942f9f47398ab153a8319b2c4d2e442d167 /config.go
parente16e2a4ec74443aa8f4c21a73ee837cb72ed46fb (diff)
downloadspdxconv-434139fe3918fdb56704558301ad9275f1da06ad.tar.xz
all: split the delete_line_pattern into before and after
While at it, also add configuration for delete line before and after for match-copyright section.
Diffstat (limited to 'config.go')
-rw-r--r--config.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/config.go b/config.go
index ed6ce10..dfa1f5f 100644
--- a/config.go
+++ b/config.go
@@ -56,10 +56,14 @@ pattern = "^.*\\.(apk|app|bz2|csv|doc|docx|exe|gif|gz|jpeg|jpg|json|pdf|png|ppt|
[match-license]
pattern = "^(//+|#+|/\\*+|<!--+)?\\s*(.*)governed by a BSD-style(.*)$"
license_identifier = BSD-3-Clause
-delete_line_pattern = "^(//+|#+|/\\*+|<!--+)?\\s*license that can(.*)$"
+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 = "^(//+|#+|\\*+/|--+>)$"
`
type config struct {