mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 21:24:21 +01:00
Composite rules (#1905)
* composite rules * add test config * tests * taking care of some pr comments * naming
This commit is contained in:
1 parent
72977e41b6
commit
b1c9c7ecbe
9 files changed
+473
-21
No files matched your search
@@ -46,6 +46,18 @@ type Rule struct {
|
||||
|
||||
// validated is an internal flag to track whether `Validate()` has been called.
|
||||
validated bool
|
||||
|
||||
// If a rule has RequiredRules, it makes the rule dependent on the RequiredRules.
|
||||
// In otherwords, this rule is now a composite rule.
|
||||
RequiredRules []*Required
|
||||
|
||||
SkipReport bool
|
||||
}
|
||||
|
||||
type Required struct {
|
||||
RuleID string
|
||||
WithinLines *int
|
||||
WithinColumns *int
|
||||
}
|
||||
|
||||
// Validate guards against common misconfigurations.
|
||||
|
||||
Reference in new issue
Block a user