mirror of
https://github.com/mgechev/revive.git
synced 2024-11-30 08:57:07 +02:00
18 lines
407 B
Go
18 lines
407 B
Go
|
package revivelib
|
||
|
|
||
|
import "github.com/mgechev/revive/lint"
|
||
|
|
||
|
// ExtraRule configures a new rule to be used with revive.
|
||
|
type ExtraRule struct {
|
||
|
Rule lint.Rule
|
||
|
DefaultConfig lint.RuleConfig
|
||
|
}
|
||
|
|
||
|
// NewExtraRule returns a configured extra rule.
|
||
|
func NewExtraRule(rule lint.Rule, defaultConfig lint.RuleConfig) ExtraRule {
|
||
|
return ExtraRule{
|
||
|
Rule: rule,
|
||
|
DefaultConfig: defaultConfig,
|
||
|
}
|
||
|
}
|