synapsecns/sanguine

View on GitHub

Showing 13,422 of 13,422 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  decimals: {
    [CHAINS.ETHEREUM.id]: 18,
    [CHAINS.OPTIMISM.id]: 18,
    [CHAINS.BOBA.id]: 18,
    [CHAINS.CANTO.id]: 18,
Severity: Major
Found in packages/rest-api/src/constants/bridgeable.ts and 1 other location - About 6 hrs to fix
packages/synapse-interface/constants/tokens/bridgeable.ts on lines 475..488

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 162.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

IOrigin has 46 methods (exceeds 20 allowed). Consider refactoring.
Open

type IOrigin struct {
    mock.Mock
}
Severity: Minor
Found in agents/contracts/origin/mocks/i_origin.go - About 6 hrs to fix

    Function standardizeResponse has a Cognitive Complexity of 56 (exceeds 20 allowed). Consider refactoring.
    Open

    func standardizeResponse(ctx context.Context, req *rpc.Request, rpcMessage JSONRPCMessage) (out []byte, err error) {
        // TODO: use a sync.pool for acquiring/releasing these structs
        method := req.Method
    
    OUTER:
    Severity: Minor
    Found in services/omnirpc/proxy/standardize.go - About 6 hrs 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

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        toInfo?: {
          __typename?: 'PartialInfo'
          chainID?: number | null
          destinationChainID?: number | null
          address?: string | null
    Severity: Major
    Found in packages/synapse-interface/slices/api/generated.ts and 1 other location - About 6 hrs to fix
    packages/synapse-interface/slices/api/generated.ts on lines 473..489

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 160.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        fromInfo?: {
          __typename?: 'PartialInfo'
          chainID?: number | null
          destinationChainID?: number | null
          address?: string | null
    Severity: Major
    Found in packages/synapse-interface/slices/api/generated.ts and 1 other location - About 6 hrs to fix
    packages/synapse-interface/slices/api/generated.ts on lines 490..506

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 160.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    package sqlite
    
    import (
        "context"
        "fmt"
    Severity: Major
    Found in services/rfq/api/db/sql/sqlite/sqlite.go and 1 other location - About 6 hrs to fix
    services/cctp-relayer/db/sql/sqlite/sqlite.go on lines 1..63

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 439.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    package sqlite
    
    import (
        "context"
        "fmt"
    Severity: Major
    Found in services/cctp-relayer/db/sql/sqlite/sqlite.go and 1 other location - About 6 hrs to fix
    services/rfq/api/db/sql/sqlite/sqlite.go on lines 1..63

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 439.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    export const OPTIMISM_POOL_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.OPTIMISM.id]: '0x2c6d91accC5Aa38c84653F28A80AEC69325BDd12',
      },
      decimals: 18,
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 3 other locations - About 6 hrs to fix
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 432..455
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 530..553
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 814..837

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 158.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    export const KLAYTN_ORBIT_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.KLAYTN.id]: '0x656757eb1e04011f6862688957ebA9eA12881244',
      },
      decimals: 18,
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 3 other locations - About 6 hrs to fix
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 96..119
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 432..455
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 814..837

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 158.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    export const OPTIMISM_POOL_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.OPTIMISM.id]: '0x2c6d91accC5Aa38c84653F28A80AEC69325BDd12',
      },
      decimals: 18,
    packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 529..552
    packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 814..837

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 158.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    export const METIS_POOL_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.METIS.id]: '0xC6f684aE516480A35f337a4dA8b40EB6550e07E0',
      },
      decimals: 18,
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 3 other locations - About 6 hrs to fix
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 96..119
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 530..553
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 814..837

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 158.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    export const HARMONY_JEWEL_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.HARMONY.id]: '0x0000000000000000000000000000000000000000',
      },
      decimals: 18,
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 3 other locations - About 6 hrs to fix
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 96..119
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 432..455
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 530..553

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 158.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    export const HARMONY_JEWEL_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.HARMONY.id]: '0x0000000000000000000000000000000000000000',
      },
      decimals: 18,
    packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 93..116
    packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 529..552

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 158.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    export const KLAYTN_ORBIT_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.KLAYTN.id]: '0x656757eb1e04011f6862688957ebA9eA12881244',
      },
      decimals: 18,
    packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 93..116
    packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 814..837

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 158.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func (ec *executionContext) field_Query_countByTokenAddress_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
        var err error
        args := map[string]interface{}{}
        var arg0 *int
        if tmp, ok := rawArgs["chainID"]; ok {
    Severity: Major
    Found in services/explorer/graphql/server/graph/resolver/server.go and 1 other location - About 6 hrs to fix
    services/explorer/graphql/server/graph/resolver/server.go on lines 2060..2100

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 438.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func (ec *executionContext) field_Query_countByChainId_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
        var err error
        args := map[string]interface{}{}
        var arg0 *int
        if tmp, ok := rawArgs["chainID"]; ok {
    Severity: Major
    Found in services/explorer/graphql/server/graph/resolver/server.go and 1 other location - About 6 hrs to fix
    services/explorer/graphql/server/graph/resolver/server.go on lines 2102..2142

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 438.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    File FastBridgeRouter.ts has 422 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* Autogenerated file. Do not edit manually. */
    /* tslint:disable */
    /* eslint-disable */
    import type {
      BaseContract,
    Severity: Minor
    Found in packages/sdk-router/src/typechain/FastBridgeRouter.ts - About 6 hrs to fix

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          u.Eventually(func() bool {
              executed, err := exec.CheckIfExecuted(u.GetTestContext(), message)
              u.Nil(err)
              if executed {
                  return true
      Severity: Major
      Found in agents/agents/agentsintegration/agentsintegration_test.go and 1 other location - About 6 hrs to fix
      agents/agents/agentsintegration/agentsintegration_test.go on lines 323..347

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 436.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          u.Eventually(func() bool {
              executed, err := exec.CheckIfExecuted(u.GetTestContext(), message)
              u.Nil(err)
              if executed {
                  return true
      Severity: Major
      Found in agents/agents/agentsintegration/agentsintegration_test.go and 1 other location - About 6 hrs to fix
      agents/agents/agentsintegration/agentsintegration_test.go on lines 417..441

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 436.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      // generate gql schema
      package main
      
      import (
          "fmt"
      Severity: Major
      Found in services/explorer/graphql/contrib/client/main.go and 1 other location - About 6 hrs to fix
      services/scribe/graphql/contrib/main.go on lines 1..56

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 435.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Severity
      Category
      Status
      Source
      Language