mesg-foundation/core

View on GitHub
server/grpc/orchestrator/runner.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method runnerServer.Register has 60 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (s *runnerServer) Register(ctx context.Context, req *RunnerRegisterRequest) (*RunnerRegisterResponse, error) {
    // check authorization
    if err := s.auth.IsAuthorized(ctx, req); err != nil {
        return nil, err
    }
Severity: Minor
Found in server/grpc/orchestrator/runner.go - About 1 hr to fix

    Method runnerServer.Register has 12 return statements (exceeds 6 allowed).
    Open

    func (s *runnerServer) Register(ctx context.Context, req *RunnerRegisterRequest) (*RunnerRegisterResponse, error) {
        // check authorization
        if err := s.auth.IsAuthorized(ctx, req); err != nil {
            return nil, err
        }
    Severity: Major
    Found in server/grpc/orchestrator/runner.go - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status