dictyBase/modware-auth

View on GitHub
internal/app/server/server.go

Summary

Maintainability
A
1 hr
Test Coverage

Function RunServer has 58 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func RunServer(c *cli.Context) error {
    conns, err := getConnections(c)
    if err != nil {
        return cli.NewExitError(
            fmt.Sprintf("Unable to connect to external service %q", err),
Severity: Minor
Found in internal/app/server/server.go - About 1 hr to fix

Function RunServer has 8 return statements (exceeds 4 allowed).
Wontfix

func RunServer(c *cli.Context) error {
    conns, err := getConnections(c)
    if err != nil {
        return cli.NewExitError(
            fmt.Sprintf("Unable to connect to external service %q", err),
Severity: Major
Found in internal/app/server/server.go - About 50 mins to fix

Function parseJwtKeys has 5 return statements (exceeds 4 allowed).
Wontfix

func parseJwtKeys(c *cli.Context) (*jwtauth.JWTAuth, error) {
    ja := &jwtauth.JWTAuth{}
    private, err := base64.StdEncoding.DecodeString(c.String("private-key"))
    if err != nil {
        return ja, err
Severity: Major
Found in internal/app/server/server.go - About 35 mins to fix

There are no issues that match your filters.

Category
Status