aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--config.go1
-rw-r--r--config_match_license.go4
-rw-r--r--spdxconv_test.go3
-rw-r--r--testdata/Apply_test.txt2
-rw-r--r--testdata/loadConfig/config_exists/spdxconv.cfg1
-rw-r--r--testdata/scan/spdxconv.cfg1
7 files changed, 1 insertions, 14 deletions
diff --git a/README.md b/README.md
index 68f2302..6a028c9 100644
--- a/README.md
+++ b/README.md
@@ -62,7 +62,6 @@ 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+license that(.*)$"
[match-copyright]
@@ -111,8 +110,6 @@ regular expression.
If there is a line that match with it, the value in
"match-license::license_identifier" will replace the
"default::license_identifier" value.
-If the "delete_match" is true, it will delete the matched line from the
-file.
If there is "delete_line_pattern" defined, it will search for line that match
with that pattern and delete it.
The "delete_line_pattern" can be defined zero or multiple times.
diff --git a/config.go b/config.go
index 1de5d7f..0fd2705 100644
--- a/config.go
+++ b/config.go
@@ -18,7 +18,6 @@ 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+license that(.*)$"
[match-copyright]
diff --git a/config_match_license.go b/config_match_license.go
index 3caddc1..818e806 100644
--- a/config_match_license.go
+++ b/config_match_license.go
@@ -24,10 +24,6 @@ type configMatchLicense struct {
// A line that match with this pattern will be deleted.
// An empty line stop the search.
DeleteLinePattern []string `ini:"match-license::delete_line_pattern"`
-
- // DeleteMatch if set to true, the line that match with Pattern will
- // be deleted.
- DeleteMatch bool `ini:"match-license::delete_match"`
}
func (cml *configMatchLicense) init() (err error) {
diff --git a/spdxconv_test.go b/spdxconv_test.go
index 68dca0f..8fbeb7e 100644
--- a/spdxconv_test.go
+++ b/spdxconv_test.go
@@ -163,8 +163,7 @@ func TestSPDXConv_loadConfig(t *testing.T) {
DeleteLinePattern: []string{
`^(//+|#+)\s+license that(.*)$`,
},
- DeleteMatch: true,
- rePattern: regexp.MustCompile(`^(//+|#+)\s+(.*)governed by a BSD-style(.*)$`),
+ rePattern: regexp.MustCompile(`^(//+|#+)\s+(.*)governed by a BSD-style(.*)$`),
reDeleteLine: []*regexp.Regexp{
regexp.MustCompile(`^(//+|#+)\s+license that(.*)$`),
},
diff --git a/testdata/Apply_test.txt b/testdata/Apply_test.txt
index 3ee49f4..712c2bc 100644
--- a/testdata/Apply_test.txt
+++ b/testdata/Apply_test.txt
@@ -14,8 +14,6 @@ file_copyright_text = M. Shulhan <ms@kilabit.info>
[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]
diff --git a/testdata/loadConfig/config_exists/spdxconv.cfg b/testdata/loadConfig/config_exists/spdxconv.cfg
index 1defeef..ec401a3 100644
--- a/testdata/loadConfig/config_exists/spdxconv.cfg
+++ b/testdata/loadConfig/config_exists/spdxconv.cfg
@@ -9,7 +9,6 @@ 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+license that(.*)$"
[match-copyright]
diff --git a/testdata/scan/spdxconv.cfg b/testdata/scan/spdxconv.cfg
index 1defeef..ec401a3 100644
--- a/testdata/scan/spdxconv.cfg
+++ b/testdata/scan/spdxconv.cfg
@@ -9,7 +9,6 @@ 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+license that(.*)$"
[match-copyright]