diff options
| author | Shulhan <ms@kilabit.info> | 2026-01-13 01:44:23 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-01-13 01:45:18 +0700 |
| commit | 434139fe3918fdb56704558301ad9275f1da06ad (patch) | |
| tree | 76f4a942f9f47398ab153a8319b2c4d2e442d167 /testdata/scan | |
| parent | e16e2a4ec74443aa8f4c21a73ee837cb72ed46fb (diff) | |
| download | spdxconv-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 'testdata/scan')
| -rw-r--r-- | testdata/scan/spdxconv.cfg | 11 | ||||
| -rw-r--r-- | testdata/scan/test.html | 8 |
2 files changed, 17 insertions, 2 deletions
diff --git a/testdata/scan/spdxconv.cfg b/testdata/scan/spdxconv.cfg index 3b137b6..1cdfefb 100644 --- a/testdata/scan/spdxconv.cfg +++ b/testdata/scan/spdxconv.cfg @@ -42,10 +42,19 @@ prefix = "%" [match-file-comment] pattern = "^.*\\.(apk|app|bz2|csv|doc|docx|exe|gif|gz|jpeg|jpg|json|pdf|png|ppt|pptx|svg|svgz|tar|tgz|xls|xlsx|zip)$" +# File name that match with this pattern will have the ".license" file +# created. +[match-file-comment] +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(.*)$" 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 = "^(//+|#+|\\*+/|--+>)$" diff --git a/testdata/scan/test.html b/testdata/scan/test.html index da2491e..bcfc0c3 100644 --- a/testdata/scan/test.html +++ b/testdata/scan/test.html @@ -1,5 +1,11 @@ <!-- Copyright 2022, Shulhan <ms@kilabit.info>. All rights reserved. +--> +<!-- Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --->
\ No newline at end of file +--> + +1 +2 +3 |
