From 2cda75bc9385da199b4db5f6cc2692bfd694fcf1 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Mon, 5 Jan 2026 22:35:40 +0700 Subject: spdxconv: tool to convert license and copyright to SPDX format This is the initial implementation, work in progress, with the following functions, * loading the spdxconv.cfg file * scanning list of files to be converted * detect .git repository and exclude files ignored by .gitignore No conversion logic is implemented yet. --- testdata/loadConfig/config_exists/spdxconv.cfg | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 testdata/loadConfig/config_exists/spdxconv.cfg (limited to 'testdata/loadConfig') diff --git a/testdata/loadConfig/config_exists/spdxconv.cfg b/testdata/loadConfig/config_exists/spdxconv.cfg new file mode 100644 index 0000000..e4edf89 --- /dev/null +++ b/testdata/loadConfig/config_exists/spdxconv.cfg @@ -0,0 +1,14 @@ +[default] +license_identifier = GPL-3.0-only +file_copyright_text = Author +max_line_match = 10 + +[match-license] +pattern = "^(//+|#+)*\\s+(.*)governed by a BSD-style(.*)$" +license_identifier = BSD-3-Clause +delete_match = true +delete_line_pattern = "^(//+|#+)*\\s*$" +delete_line_pattern = "^(//+|#+)*\\s+license that(.*)$" + +[match-copyright] +pattern = "^(//+|#+)*\\s+Copyright\\s+(?\\d{4},?\\s+(?.*)\\s+<*(?.*)>.*$" -- cgit v1.3