Skip to content

Commit 85a89db

Browse files
hugo-synrhysd
authored andcommittedFeb 9, 2024
Add a GetConfig method (#387)
* Update rule.go * fix: fix lint and add GetConfig to interface
1 parent 86df2f6 commit 85a89db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎rule.go

+6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ func (r *RuleBase) SetConfig(cfg *Config) {
9090
r.config = cfg
9191
}
9292

93+
// GetConfig returns the config of the rule
94+
func (r *RuleBase) GetConfig() *Config {
95+
return r.config
96+
}
97+
9398
// Rule is an interface which all rule structs must meet.
9499
type Rule interface {
95100
Pass
@@ -98,4 +103,5 @@ type Rule interface {
98103
Description() string
99104
EnableDebug(out io.Writer)
100105
SetConfig(cfg *Config)
106+
GetConfig() *Config
101107
}

0 commit comments

Comments
 (0)
Please sign in to comment.