synapsecns/sanguine

View on GitHub

Showing 1,971 of 13,422 total issues

Method executionContext.___EnumValue_description has 5 return statements (exceeds 4 allowed).
Open

func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
    fc, err := ec.fieldContext___EnumValue_description(ctx, field)
    if err != nil {
        return graphql.Null
    }
Severity: Major
Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

    Method executionContext.___Field_name has 5 return statements (exceeds 4 allowed).
    Open

    func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
        fc, err := ec.fieldContext___Field_name(ctx, field)
        if err != nil {
            return graphql.Null
        }
    Severity: Major
    Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

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

      func request_ScribeService_Watch_0(ctx context.Context, marshaler runtime.Marshaler, client ScribeServiceClient, req *http.Request, pathParams map[string]string) (ScribeService_WatchClient, runtime.ServerMetadata, error) {
          var protoReq HealthCheckRequest
          var metadata runtime.ServerMetadata
      
          newReader, berr := utilities.IOReaderFactory(req.Body)
      Severity: Major
      Found in services/scribe/grpc/types/types/v1/service.pb.gw.go - About 35 mins to fix

        Method executionContext._Log_block_hash has 5 return statements (exceeds 4 allowed).
        Open

        func (ec *executionContext) _Log_block_hash(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
            fc, err := ec.fieldContext_Log_block_hash(ctx, field)
            if err != nil {
                return graphql.Null
            }
        Severity: Major
        Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

          Method executionContext._Query_transactionsAtHeadRange has 5 return statements (exceeds 4 allowed).
          Open

          func (ec *executionContext) _Query_transactionsAtHeadRange(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
              fc, err := ec.fieldContext_Query_transactionsAtHeadRange(ctx, field)
              if err != nil {
                  return graphql.Null
              }
          Severity: Major
          Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

            Method executionContext._Transaction_protected has 5 return statements (exceeds 4 allowed).
            Open

            func (ec *executionContext) _Transaction_protected(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
                fc, err := ec.fieldContext_Transaction_protected(ctx, field)
                if err != nil {
                    return graphql.Null
                }
            Severity: Major
            Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

              Method executionContext._Transaction_logs has 5 return statements (exceeds 4 allowed).
              Open

              func (ec *executionContext) _Transaction_logs(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
                  fc, err := ec.fieldContext_Transaction_logs(ctx, field)
                  if err != nil {
                      return graphql.Null
                  }
              Severity: Major
              Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

                Method executionContext.___Directive_locations has 5 return statements (exceeds 4 allowed).
                Open

                func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
                    fc, err := ec.fieldContext___Directive_locations(ctx, field)
                    if err != nil {
                        return graphql.Null
                    }
                Severity: Major
                Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

                  Method executionContext.___EnumValue_isDeprecated has 5 return statements (exceeds 4 allowed).
                  Open

                  func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
                      fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field)
                      if err != nil {
                          return graphql.Null
                      }
                  Severity: Major
                  Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

                    Method ChainIndexer.IndexToBlock has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring.
                    Open

                    func (c *ChainIndexer) IndexToBlock(parentContext context.Context, configStart uint64, configEnd *uint64, indexer *indexer.Indexer) error {
                        timeout := time.Duration(0)
                        b := createBackoff()
                        for {
                            select {
                    Severity: Minor
                    Found in services/scribe/service/chain.go - About 35 mins to fix

                    Cognitive Complexity

                    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                    A method's cognitive complexity is based on a few simple rules:

                    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                    • Code is considered more complex for each "break in the linear flow of the code"
                    • Code is considered more complex when "flow breaking structures are nested"

                    Further reading

                    Method executionContext._Query_transactionsRange has 5 return statements (exceeds 4 allowed).
                    Open

                    func (ec *executionContext) _Query_transactionsRange(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
                        fc, err := ec.fieldContext_Query_transactionsRange(ctx, field)
                        if err != nil {
                            return graphql.Null
                        }
                    Severity: Major
                    Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

                      Method executionContext._Query_receiptsAtHeadRange has 5 return statements (exceeds 4 allowed).
                      Open

                      func (ec *executionContext) _Query_receiptsAtHeadRange(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
                          fc, err := ec.fieldContext_Query_receiptsAtHeadRange(ctx, field)
                          if err != nil {
                              return graphql.Null
                          }
                      Severity: Major
                      Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

                        Method executionContext._Receipt_block_number has 5 return statements (exceeds 4 allowed).
                        Open

                        func (ec *executionContext) _Receipt_block_number(ctx context.Context, field graphql.CollectedField, obj *model.Receipt) (ret graphql.Marshaler) {
                            fc, err := ec.fieldContext_Receipt_block_number(ctx, field)
                            if err != nil {
                                return graphql.Null
                            }
                        Severity: Major
                        Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

                          Method executionContext._Transaction_receipt has 5 return statements (exceeds 4 allowed).
                          Open

                          func (ec *executionContext) _Transaction_receipt(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
                              fc, err := ec.fieldContext_Transaction_receipt(ctx, field)
                              if err != nil {
                                  return graphql.Null
                              }
                          Severity: Major
                          Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

                            Method executionContext._Query_logs has 5 return statements (exceeds 4 allowed).
                            Open

                            func (ec *executionContext) _Query_logs(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
                                fc, err := ec.fieldContext_Query_logs(ctx, field)
                                if err != nil {
                                    return graphql.Null
                                }
                            Severity: Major
                            Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

                              Method executionContext._Transaction_to has 5 return statements (exceeds 4 allowed).
                              Open

                              func (ec *executionContext) _Transaction_to(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
                                  fc, err := ec.fieldContext_Transaction_to(ctx, field)
                                  if err != nil {
                                      return graphql.Null
                                  }
                              Severity: Major
                              Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

                                Method executionContext.___Schema_directives has 5 return statements (exceeds 4 allowed).
                                Open

                                func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
                                    fc, err := ec.fieldContext___Schema_directives(ctx, field)
                                    if err != nil {
                                        return graphql.Null
                                    }
                                Severity: Major
                                Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

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

                                  func request_ScribeService_StreamLogs_0(ctx context.Context, marshaler runtime.Marshaler, client ScribeServiceClient, req *http.Request, pathParams map[string]string) (ScribeService_StreamLogsClient, runtime.ServerMetadata, error) {
                                      var protoReq StreamLogsRequest
                                      var metadata runtime.ServerMetadata
                                  
                                      newReader, berr := utilities.IOReaderFactory(req.Body)
                                  Severity: Major
                                  Found in services/scribe/grpc/types/types/v1/service.pb.gw.go - About 35 mins to fix

                                    Method executionContext._Log_json has 5 return statements (exceeds 4 allowed).
                                    Open

                                    func (ec *executionContext) _Log_json(ctx context.Context, field graphql.CollectedField, obj *model.Log) (ret graphql.Marshaler) {
                                        fc, err := ec.fieldContext_Log_json(ctx, field)
                                        if err != nil {
                                            return graphql.Null
                                        }
                                    Severity: Major
                                    Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix

                                      Method executionContext._Transaction_data has 5 return statements (exceeds 4 allowed).
                                      Open

                                      func (ec *executionContext) _Transaction_data(ctx context.Context, field graphql.CollectedField, obj *model.Transaction) (ret graphql.Marshaler) {
                                          fc, err := ec.fieldContext_Transaction_data(ctx, field)
                                          if err != nil {
                                              return graphql.Null
                                          }
                                      Severity: Major
                                      Found in services/scribe/graphql/server/graph/resolver/server.go - About 35 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language