diff --git a/rule.go b/rule.go index ed0e169b1..8a84030e7 100644 --- a/rule.go +++ b/rule.go @@ -90,6 +90,11 @@ func (r *RuleBase) SetConfig(cfg *Config) { r.config = cfg } +// GetConfig returns the config of the rule +func (r *RuleBase) GetConfig() *Config { + return r.config +} + // Rule is an interface which all rule structs must meet. type Rule interface { Pass @@ -98,4 +103,5 @@ type Rule interface { Description() string EnableDebug(out io.Writer) SetConfig(cfg *Config) + GetConfig() *Config }