vorteil/direktiv

View on GitHub
pkg/gateway/fetch_secret.go

Summary

Maintainability
A
1 hr
Test Coverage

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

func fetchSecret(db *database.SQLStore, namespace string, callExpression string) (string, error) {
    callExpression = strings.TrimSpace(callExpression)
    if !strings.HasPrefix(callExpression, "fetchSecret") {
        return callExpression, nil
    }
Severity: Major
Found in pkg/gateway/fetch_secret.go - About 40 mins to fix

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

    func parseFetchSecretExpressionTwoArgs(callExpression string) (*fetchSecretArgs, error) {
        // parse fetchSecret( g1 ) pattern
        pattern := `^[ ]{0,}fetchSecret[ ]{0,}\((.*)\)[ ]{0,}$`
        regex := regexp.MustCompile(pattern)
        matches := regex.FindStringSubmatch(callExpression)
    Severity: Major
    Found in pkg/gateway/fetch_secret.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status