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/loadConfig | |
| 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/loadConfig')
| -rw-r--r-- | testdata/loadConfig/config_exists/spdxconv.cfg | 46 |
1 files changed, 43 insertions, 3 deletions
diff --git a/testdata/loadConfig/config_exists/spdxconv.cfg b/testdata/loadConfig/config_exists/spdxconv.cfg index ec401a3..1f7ff68 100644 --- a/testdata/loadConfig/config_exists/spdxconv.cfg +++ b/testdata/loadConfig/config_exists/spdxconv.cfg @@ -3,13 +3,53 @@ [default] license_identifier = GPL-3.0-only +copyright_year = 2026 file_copyright_text = Author <contact@email.local> max_line_match = 10 +[match-file-comment] +pattern = "^.*\\.(adoc|asciidoc|c|cc|cpp|cs|dart|go|h|hh|hpp|java|js|jsx|jsonc|kt|kts|php|rs|sass|scss|swift|ts|tsx)$" +prefix = "//" + +[match-file-comment] +pattern = "^.*\\.(aff|bash|csh|dockerfile|env|gitignore|hcl|ipynb|make|pl|pm|py|ps1|rb|sh|tf|yaml|yml|zsh)$" +prefix = "#" + +[match-file-comment] +pattern = "^.*\\.(css)$" +prefix = "/*" +suffix = "*/" + +[match-file-comment] +pattern = "^.*\\.(fxml|htm|html|html5|kml|markdown|md|xml)$" +prefix = "<!--" +suffix = "-->" + +[match-file-comment] +pattern = "^.*\\.(lua|sql)$" +prefix = "--" + +[match-file-comment] +pattern = "^.*\\.(rst)$" +prefix = ".." + +[match-file-comment] +pattern = "^.*\\.(tex)$" +prefix = "%" + +# 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(.*)$" +pattern = "^(//+|#+|/\\*+|<!--+)?\\s*(.*)governed by a BSD-style(.*)$" license_identifier = BSD-3-Clause -delete_line_pattern = "^(//+|#+)\\s+license that(.*)$" +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>.*)>.*$" +pattern = "^(//+|#+|/\\*+|<!--+)?\\s*Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<(?<contact>.*)>.*$" +delete_line_before = "^(//+|#+|/\\*+|<!--+)$" +delete_line_after = "^(//+|#+|\\*+/|--+>)$" |
