src/go/plugin/go.d/agent/discovery/sd/pipeline/config.go
Function validateClassifyConfig
has 7 return statements (exceeds 4 allowed). Open
Open
func validateClassifyConfig(rules []ClassifyRuleConfig) error {
if len(rules) == 0 {
return errors.New("empty config, need least 1 rule")
}
for i, rule := range rules {
Function validateComposeConfig
has 6 return statements (exceeds 4 allowed). Open
Open
func validateComposeConfig(rules []ComposeRuleConfig) error {
if len(rules) == 0 {
return errors.New("empty config, need least 1 rule")
}
for i, rule := range rules {
Function validateConfig
has 5 return statements (exceeds 4 allowed). Open
Open
func validateConfig(cfg Config) error {
if cfg.Name == "" {
return errors.New("'name' not set")
}
if err := validateDiscoveryConfig(cfg.Discover); err != nil {