synapsecns/sanguine

View on GitHub

Showing 1,971 of 13,422 total issues

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

// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.

package resolvers

import (
Severity: Major
Found in services/explorer/graphql/server/graph/resolver/server.go - About 1 mo to fix

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

    // Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
    
    package resolvers
    
    import (
    Severity: Major
    Found in services/explorer/consumer/client/resolver-client/server.go - About 3 wks to fix

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

      // Code generated by github.com/99designs/gqlgen, DO NOT EDIT.
      
      package resolvers
      
      import (
      Severity: Major
      Found in services/scribe/graphql/server/graph/resolver/server.go - About 3 wks to fix

        File mockRoutes.ts has 3429 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        export const mockRoutes = {
          'AVAX-1284': [
            'AVAX-8217',
            'WAVAX-43114',
            'AVAX-43114',
        Severity: Major
        Found in packages/synapse-interface/__tests__/__fixtures__/mockRoutes.ts - About 1 wk to fix

          executionContext has 475 methods (exceeds 20 allowed). Consider refactoring.
          Open

          type executionContext struct {
              *graphql.OperationContext
              *executableSchema
              deferred        int32
              pendingDeferred int32
          Severity: Major
          Found in services/explorer/graphql/server/graph/resolver/server.go - About 1 wk to fix

            executionContext has 298 methods (exceeds 20 allowed). Consider refactoring.
            Open

            type executionContext struct {
                *graphql.OperationContext
                *executableSchema
                deferred        int32
                pendingDeferred int32
            Severity: Major
            Found in services/explorer/consumer/client/resolver-client/server.go - About 6 days to fix

              executionContext has 298 methods (exceeds 20 allowed). Consider refactoring.
              Open

              type executionContext struct {
                  *graphql.OperationContext
                  *executableSchema
                  deferred        int32
                  pendingDeferred int32
              Severity: Major
              Found in services/scribe/graphql/server/graph/resolver/server.go - About 6 days to fix

                File bridgeMap.ts has 2092 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                export const BRIDGE_MAP = {
                  '1': {
                    '0x0642026E7f0B6cCaC5925b4E7Fa61384250e1701': {
                      decimals: 18,
                      symbol: 'H2O',
                Severity: Major
                Found in packages/synapse-interface/constants/bridgeMap.ts - About 5 days to fix

                  File bridgeMap.ts has 2092 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  export const BRIDGE_MAP = {
                    '1': {
                      '0x0642026E7f0B6cCaC5925b4E7Fa61384250e1701': {
                        decimals: 18,
                        symbol: 'H2O',
                  Severity: Major
                  Found in packages/synapse-constants/src/constants/bridgeMap.ts - About 5 days to fix

                    File bridgeMap.ts has 2092 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    export const BRIDGE_MAP = {
                      '1': {
                        '0x0642026E7f0B6cCaC5925b4E7Fa61384250e1701': {
                          decimals: 18,
                          symbol: 'H2O',
                    Severity: Major
                    Found in packages/widget/src/constants/bridgeMap.ts - About 5 days to fix

                      File bridgeMap.ts has 2092 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      export const BRIDGE_MAP = {
                        '1': {
                          '0x0642026E7f0B6cCaC5925b4E7Fa61384250e1701': {
                            decimals: 18,
                            symbol: 'H2O',
                      Severity: Major
                      Found in packages/rest-api/src/constants/bridgeMap.ts - About 5 days to fix

                        Method executableSchema.Complexity has a Cognitive Complexity of 281 (exceeds 20 allowed). Consider refactoring.
                        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: Minor
                        Found in services/explorer/graphql/server/graph/resolver/server.go - About 5 days 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 a Cognitive Complexity of 241 (exceeds 20 allowed). Consider refactoring.
                        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: Minor
                        Found in services/explorer/api/server.go - About 4 days 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 SynapseBridge.ts has 1633 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /* Autogenerated file. Do not edit manually. */
                        /* tslint:disable */
                        /* eslint-disable */
                        import type {
                          BaseContract,
                        Severity: Major
                        Found in packages/sdk-router/src/typechain/SynapseBridge.ts - About 4 days to fix

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

                          import { Provider } from '@ethersproject/abstract-provider'
                          import { BigNumber, PopulatedTransaction } from 'ethers'
                          import { AddressZero, Zero } from '@ethersproject/constants'
                          import { parseFixed } from '@ethersproject/bignumber'
                          
                          
                          Severity: Major
                          Found in packages/sdk-router/src/sdk.test.ts - About 4 days to fix

                            File FastBridge.ts has 1401 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /* Autogenerated file. Do not edit manually. */
                            /* tslint:disable */
                            /* eslint-disable */
                            import type {
                              BaseContract,
                            Severity: Major
                            Found in packages/sdk-router/src/typechain/FastBridge.ts - About 3 days to fix

                              File bridgeable.ts has 1364 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              import { ZeroAddress } from 'ethers'
                              import { BridgeableToken } from 'types'
                              
                              import { CHAINS } from '@/constants/chains'
                              
                              
                              Severity: Major
                              Found in packages/widget/src/constants/bridgeable.ts - About 3 days to fix

                                File bridgeable.ts has 1348 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                import { BridgeableToken } from '../types'
                                import { CHAINS } from './chains'
                                
                                const NativeTokenAddress = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'
                                
                                
                                Severity: Major
                                Found in packages/rest-api/src/constants/bridgeable.ts - About 3 days to fix

                                  File chain_test.go has 1584 lines of code (exceeds 500 allowed). Consider refactoring.
                                  Open

                                  package backfill_test
                                  
                                  import (
                                      gosql "database/sql"
                                      "fmt"
                                  Severity: Major
                                  Found in services/explorer/backfill/chain_test.go - About 3 days to fix

                                    Method executableSchema.Complexity has 692 lines of code (exceeds 50 allowed). Consider refactoring.
                                    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 3 days to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language