diff options
Diffstat (limited to 'testdata/scan')
| -rw-r--r-- | testdata/scan/no_copyright_year.md | 7 | ||||
| -rw-r--r-- | testdata/scan/spdxconv.cfg | 16 | ||||
| -rw-r--r-- | testdata/scan/test.sh | 6 | ||||
| -rw-r--r-- | testdata/scan/test.sql | 5 |
4 files changed, 23 insertions, 11 deletions
diff --git a/testdata/scan/no_copyright_year.md b/testdata/scan/no_copyright_year.md new file mode 100644 index 0000000..be47d2e --- /dev/null +++ b/testdata/scan/no_copyright_year.md @@ -0,0 +1,7 @@ +<!-- +Copyright 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. +--> + +The copyrightYear will use the default one. diff --git a/testdata/scan/spdxconv.cfg b/testdata/scan/spdxconv.cfg index 1cdfefb..082d482 100644 --- a/testdata/scan/spdxconv.cfg +++ b/testdata/scan/spdxconv.cfg @@ -3,7 +3,7 @@ [default] license_identifier = GPL-3.0-only -copyright_year = 2026 +copyright_year = 2025 file_copyright_text = Author <contact@email.local> max_line_match = 10 @@ -48,13 +48,13 @@ pattern = "^.*\\.(apk|app|bz2|csv|doc|docx|exe|gif|gz|jpeg|jpg|json|pdf|png|ppt| 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_before = "^(//+|#+|/\\*+|<!--+)$" -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 = "^(//+|#+|/\\*+|<!--+)$" -delete_line_after = "^(//+|#+|\\*+/|--+>)$" +pattern = "^(//+|#+|/\\*+|<!--+|--+)?\\s*Copyright\\s+(?<year>\\d{4}),?\\s+(?<author>.*)\\s+<(?<contact>.*)>.*$" +delete_line_before = "^(//+|#+|/\\*+|<!--+|--+)$" +delete_line_after = "^(//+|#+|\\*+/|--+>|--+)$" diff --git a/testdata/scan/test.sh b/testdata/scan/test.sh index 8fd6949..13b4657 100644 --- a/testdata/scan/test.sh +++ b/testdata/scan/test.sh @@ -1,3 +1,3 @@ -# 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 +#!/bin/sh + +# Test getYearFromSCM. diff --git a/testdata/scan/test.sql b/testdata/scan/test.sql new file mode 100644 index 0000000..86d55b3 --- /dev/null +++ b/testdata/scan/test.sql @@ -0,0 +1,5 @@ +-- 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. + +-- comment |
