mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 20:24:22 +01:00
Add experimental allowlist optimizations (#1731)
* feat(allowlist): optimization experiments * refactor(allowlist): remove useOptimizations flag * refactor(allowlist): simplify Validate() with helper func * refactor(config): replace global feature flag
This commit is contained in:
1 parent
79068b35e5
commit
9faaa4a09c
9 files changed
+363
-42
No files matched your search
@@ -2275,6 +2275,9 @@ func TestDetectRuleAllowlist(t *testing.T) {
|
||||
let password = 'Summer2024!';`
|
||||
for name, tc := range cases {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
err := tc.allowlist.Validate()
|
||||
require.NoError(t, err)
|
||||
|
||||
rule := config.Rule{
|
||||
RuleID: "test-rule",
|
||||
Regex: regexp.MustCompile(`Summer2024!`),
|
||||
|
||||
Reference in new issue
Block a user