great branch name (#1721)

* great branch name

* update test
This commit is contained in:
Zachary Rice authored and GitHub committed 2025-01-21 19:52:05 -06:00
1 parent d2ffffecbd
commit d6a828a530
3 files changed
+103 -103

No files matched your search

+2 -2
View File
@@ -19,11 +19,11 @@ const (
identifierCaseInsensitivePrefix = `[\w.-]{0,50}?(?i:`
identifierCaseInsensitiveSuffix = `)`
identifierPrefix = `[\w.-]{0,50}?(?:`
identifierSuffix = `)(?:[ \t\w.-]{0,20})[\s'"|]{0,3}`
identifierSuffix = `)(?:[ \t\w.-]{0,20})[\s'"]{0,3}`
// commonly used assignment operators or function call
//language=regexp
operator = `(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=|,)`
operator = `(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)`
// boundaries for the secret
secretPrefixUnique = `\b(`
+3 -3
View File
@@ -68,7 +68,7 @@ func TestGenerateSemiGenericRegex(t *testing.T) {
"api_key\t\t\t\t\t=xxx",
"api_key\n\n\n=xxx", // potentially invalid?,
"api_key\r\n=xxx",
"api_key|||=xxx",
// "api_key|||=xxx",
},
invalidStrings: []string{
"api_key&=xxx",
@@ -89,8 +89,8 @@ func TestGenerateSemiGenericRegex(t *testing.T) {
"<api_key>xxx",
"api_key:=xxx",
"api_key:::=xxx",
"api_key||:=xxx",
"api_key <= xxx",
// "api_key||:=xxx", // this isn't anything
// "api_key <= xxx",
"api_key => xxx",
"api_key ?= xxx",
"api_key, xxx",