diff options
Diffstat (limited to 'testdata')
| -rw-r--r-- | testdata/Apply_test.txt | 30 | ||||
| -rw-r--r-- | testdata/scan/spdxconv.cfg | 6 |
2 files changed, 29 insertions, 7 deletions
diff --git a/testdata/Apply_test.txt b/testdata/Apply_test.txt index 611f654..123dc28 100644 --- a/testdata/Apply_test.txt +++ b/testdata/Apply_test.txt @@ -17,7 +17,7 @@ pattern = "^.*\\.(adoc|asciidoc|c|cc|cpp|cs|dart|go|h|hh|hpp|java|js|jsx|jsonc|k prefix = "//" [match-file-comment] -pattern = "^.*\\.(bash|csh|dockerfile|env|gitignore|hcl|ipynb|make|pl|pm|py|ps1|rb|sh|tf|yaml|yml|zsh)$" +pattern = "^.*\\.(aff|bash|csh|dockerfile|env|gitignore|hcl|ipynb|make|pl|pm|py|ps1|rb|sh|tf|yaml|yml|zsh)$" prefix = "#" [match-file-comment] @@ -48,12 +48,12 @@ 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_pattern = "^(//+|#+)\\s+license that(.*)$" +delete_line_pattern = "^(//+|#+|/\\*+|<!--+)?\\s*license that can(.*)$" [match-copyright] -pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<contact>.*)>.*$" +pattern = "^(//+|#+|/\\*+|<!--+)?\\s*Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<(?<contact>.*)>.*$" >>> without_spdx_license_id.go 1 @@ -162,5 +162,27 @@ pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?< 2 3 +>>> with.html +<!-- +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. +--> + +1 +2 +3 + +<<< with.html +<!-- SPDX-License-Identifier: BSD-3-Clause --> +<!-- SPDX-FileCopyrightText: 2022 Shulhan <ms@kilabit.info> --> +<!-- + +--> + +1 +2 +3 + <<< END // REUSE-IgnoreEnd diff --git a/testdata/scan/spdxconv.cfg b/testdata/scan/spdxconv.cfg index 59ae864..3b137b6 100644 --- a/testdata/scan/spdxconv.cfg +++ b/testdata/scan/spdxconv.cfg @@ -43,9 +43,9 @@ 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_pattern = "^(//+|#+)\\s+license that(.*)$" +delete_line_pattern = "^(//+|#+|/\\*+|<!--+)?\\s*license that can(.*)$" [match-copyright] -pattern = "^(//+|#+)\\s+Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<*(?<contact>.*)>.*$" +pattern = "^(//+|#+|/\\*+|<!--+)?\\s*Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<(?<contact>.*)>.*$" |
