kubenetworks/kubevpn

View on GitHub
pkg/core/route.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method Route.GenerateServers has 58 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (r *Route) GenerateServers() ([]Server, error) {
    chain, err := r.parseChain()
    if err != nil && !errors.Is(err, ErrorInvalidNode) {
        log.Errorf("Failed to parse chain: %v", err)
        return nil, err
Severity: Minor
Found in pkg/core/route.go - About 1 hr to fix

    Method Route.GenerateServers has 8 return statements (exceeds 4 allowed).
    Open

    func (r *Route) GenerateServers() ([]Server, error) {
        chain, err := r.parseChain()
        if err != nil && !errors.Is(err, ErrorInvalidNode) {
            log.Errorf("Failed to parse chain: %v", err)
            return nil, err
    Severity: Major
    Found in pkg/core/route.go - About 50 mins to fix

      There are no issues that match your filters.

      Category
      Status