netdata/netdata

View on GitHub
src/go/collectors/go.d.plugin/agent/discovery/sd/pipeline/config.go

Summary

Maintainability
A
2 hrs
Test Coverage

Function validateClassifyConfig has 7 return statements (exceeds 4 allowed).
Open

func validateClassifyConfig(rules []ClassifyRuleConfig) error {
    if len(rules) == 0 {
        return errors.New("empty config, need least 1 rule")
    }
    for i, rule := range rules {
Severity: Major
Found in src/go/collectors/go.d.plugin/agent/discovery/sd/pipeline/config.go - About 45 mins to fix

    Function validateComposeConfig has 6 return statements (exceeds 4 allowed).
    Open

    func validateComposeConfig(rules []ComposeRuleConfig) error {
        if len(rules) == 0 {
            return errors.New("empty config, need least 1 rule")
        }
        for i, rule := range rules {
    Severity: Major
    Found in src/go/collectors/go.d.plugin/agent/discovery/sd/pipeline/config.go - About 40 mins to fix

      Function validateConfig has 5 return statements (exceeds 4 allowed).
      Open

      func validateConfig(cfg Config) error {
          if cfg.Name == "" {
              return errors.New("'name' not set")
          }
          if err := validateDiscoveryConfig(cfg.Discover); err != nil {
      Severity: Major
      Found in src/go/collectors/go.d.plugin/agent/discovery/sd/pipeline/config.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status