synapsecns/sanguine

View on GitHub

Showing 1,971 of 13,422 total issues

Method AgentsIntegrationSuite.TestAgentsE2E has 327 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (u *AgentsIntegrationSuite) TestAgentsE2E() {
    testDone := false
    defer func() {
        testDone = true
    }()
Severity: Major
Found in agents/agents/agentsintegration/agentsintegration_test.go - About 1 day to fix

    Method executableSchema.Complexity has 141 return statements (exceeds 4 allowed).
    Open

    func (e *executableSchema) Complexity(typeName, field string, childComplexity int, rawArgs map[string]interface{}) (int, bool) {
        ec := executionContext{nil, e, 0, 0, nil}
        _ = ec
        switch typeName + "." + field {
    
    
    Severity: Major
    Found in services/explorer/graphql/server/graph/resolver/server.go - About 1 day to fix

      Method executionContext._Log has a Cognitive Complexity of 89 (exceeds 20 allowed). Consider refactoring.
      Open

      func (ec *executionContext) _Log(ctx context.Context, sel ast.SelectionSet, obj *model.Log) graphql.Marshaler {
          fields := graphql.CollectFields(ec.OperationContext, sel, logImplementors)
      
          out := graphql.NewFieldSet(fields)
          deferred := make(map[string]*graphql.FieldSet)
      Severity: Minor
      Found in services/explorer/consumer/client/resolver-client/server.go - About 1 day 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._Log has a Cognitive Complexity of 89 (exceeds 20 allowed). Consider refactoring.
      Open

      func (ec *executionContext) _Log(ctx context.Context, sel ast.SelectionSet, obj *model.Log) graphql.Marshaler {
          fields := graphql.CollectFields(ec.OperationContext, sel, logImplementors)
      
          out := graphql.NewFieldSet(fields)
          deferred := make(map[string]*graphql.FieldSet)
      Severity: Minor
      Found in services/scribe/graphql/server/graph/resolver/server.go - About 1 day 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

      Function RehydrateCache has 138 return statements (exceeds 4 allowed).
      Open

      func RehydrateCache(parentCtx context.Context, client *gqlClient.Client, service cache.Service, handler metrics.Handler) (err error) {
          traceCtx, span := handler.Tracer().Start(parentCtx, "RehydrateCache")
          defer func() {
              metrics.EndSpanWithErr(span, err)
          }()
      Severity: Major
      Found in services/explorer/api/server.go - About 1 day to fix

        Method executionContext._Receipt has a Cognitive Complexity of 88 (exceeds 20 allowed). Consider refactoring.
        Open

        func (ec *executionContext) _Receipt(ctx context.Context, sel ast.SelectionSet, obj *model.Receipt) graphql.Marshaler {
            fields := graphql.CollectFields(ec.OperationContext, sel, receiptImplementors)
        
            out := graphql.NewFieldSet(fields)
            deferred := make(map[string]*graphql.FieldSet)
        Severity: Minor
        Found in services/explorer/consumer/client/resolver-client/server.go - About 1 day 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._Receipt has a Cognitive Complexity of 88 (exceeds 20 allowed). Consider refactoring.
        Open

        func (ec *executionContext) _Receipt(ctx context.Context, sel ast.SelectionSet, obj *model.Receipt) graphql.Marshaler {
            fields := graphql.CollectFields(ec.OperationContext, sel, receiptImplementors)
        
            out := graphql.NewFieldSet(fields)
            deferred := make(map[string]*graphql.FieldSet)
        Severity: Minor
        Found in services/scribe/graphql/server/graph/resolver/server.go - About 1 day 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

        Function OverviewChart has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
        Open

        export const OverviewChart: React.FC<OverviewChartProps> = ({
          chartData,
          isUSD,
          loading = false,
          showAggregated,
        Severity: Minor
        Found in packages/explorer-ui/components/ChainChart/index.tsx - About 1 day 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

        File master.tsx has 619 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import arbitrumImg from '@assets/chains/arbitrum.svg'
        import auroraImg from '@assets/chains/aurora.svg'
        import avalancheImg from '@assets/chains/avalanche.svg'
        import baseImg from '@assets/chains/base.svg'
        import blastImg from '@assets/chains/blast.svg'
        Severity: Major
        Found in packages/synapse-interface/constants/chains/master.tsx - About 1 day to fix

          IInbox has 72 methods (exceeds 20 allowed). Consider refactoring.
          Open

          type IInbox struct {
              mock.Mock
          }
          Severity: Major
          Found in agents/contracts/inbox/mocks/i_inbox.go - About 1 day to fix

            File server.go has 847 lines of code (exceeds 500 allowed). Consider refactoring.
            Open

            package api
            
            import (
                "context"
                "encoding/json"
            Severity: Major
            Found in services/explorer/api/server.go - About 1 day to fix

              File i_origin.go has 837 lines of code (exceeds 500 allowed). Consider refactoring.
              Open

              // Code generated by mockery v2.14.0. DO NOT EDIT.
              
              package mocks
              
              import (
              Severity: Major
              Found in agents/contracts/origin/mocks/i_origin.go - About 1 day to fix

                File executor_test.go has 823 lines of code (exceeds 500 allowed). Consider refactoring.
                Open

                package executor_test
                
                import (
                    "fmt"
                    "math/big"
                Severity: Major
                Found in agents/agents/executor/executor_test.go - About 1 day to fix

                  Function MetamaskIcon has 243 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const MetamaskIcon: React.FC<IconProps> = (props) => {
                    return (
                      <svg
                        width="50"
                        height="49"
                  Severity: Major
                  Found in packages/synapse-interface/components/icons/WalletIcons/Metamask.tsx - About 1 day to fix

                    File getToTokens.test.ts has 570 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import { expect } from '@jest/globals'
                    
                    import { getToTokens } from '@/utils/routeMaker/getToTokens'
                    import { mockRoutes } from './__fixtures__/mockRoutes'
                    
                    
                    Severity: Major
                    Found in packages/synapse-interface/__tests__/getToTokens.test.ts - About 1 day to fix

                      Function HowSynapseWorks has 242 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function HowSynapseWorks() {
                        return (
                          <svg
                            width="1590"
                            height="500"

                        IBondingManager has 66 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                        type IBondingManager struct {
                            mock.Mock
                        }
                        Severity: Major
                        Found in agents/contracts/bondingmanager/mocks/i_bonding_manager.go - About 1 day to fix

                          SimulatedTestBackend has 66 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                          type SimulatedTestBackend struct {
                              mock.Mock
                          }
                          Severity: Major
                          Found in ethergo/backends/mocks/simulated_test_backend.go - About 1 day to fix

                            File partials.go has 814 lines of code (exceeds 500 allowed). Consider refactoring.
                            Open

                            package graph
                            
                            // TODO make more dynamic.
                            const swapDeDup = `
                            swapDeDup AS (
                            Severity: Major
                            Found in services/explorer/graphql/server/graph/partials.go - About 1 day to fix

                              File client.go has 811 lines of code (exceeds 500 allowed). Consider refactoring.
                              Open

                              // Code generated by github.com/Yamashou/gqlgenc, DO NOT EDIT.
                              
                              package client
                              
                              import (
                              Severity: Major
                              Found in services/scribe/graphql/client/client.go - About 1 day to fix
                                Severity
                                Category
                                Status
                                Source
                                Language