synapsecns/sanguine

View on GitHub

Showing 13,422 of 13,422 total issues

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

func (_m *ILightManager) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*lightmanager.LightManagerOwnershipTransferStartedIterator, error) {
    ret := _m.Called(opts, previousOwner, newOwner)

    var r0 *lightmanager.LightManagerOwnershipTransferStartedIterator
    if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) *lightmanager.LightManagerOwnershipTransferStartedIterator); ok {
Severity: Major
Found in agents/contracts/lightmanager/mocks/i_light_manager.go and 11 other locations - About 4 hrs to fix
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 380..400
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 403..423
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 134..154
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 157..177
agents/contracts/inbox/mocks/i_inbox.go on lines 318..338
agents/contracts/inbox/mocks/i_inbox.go on lines 341..361
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 272..292
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 295..315
agents/contracts/lightmanager/mocks/i_light_manager.go on lines 311..331
agents/contracts/origin/mocks/i_origin.go on lines 132..152
agents/contracts/origin/mocks/i_origin.go on lines 155..175

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 326.

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 12 locations. Consider refactoring.
Open

func (_m *ILightManager) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*lightmanager.LightManagerOwnershipTransferredIterator, error) {
    ret := _m.Called(opts, previousOwner, newOwner)

    var r0 *lightmanager.LightManagerOwnershipTransferredIterator
    if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) *lightmanager.LightManagerOwnershipTransferredIterator); ok {
Severity: Major
Found in agents/contracts/lightmanager/mocks/i_light_manager.go and 11 other locations - About 4 hrs to fix
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 380..400
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 403..423
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 134..154
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 157..177
agents/contracts/inbox/mocks/i_inbox.go on lines 318..338
agents/contracts/inbox/mocks/i_inbox.go on lines 341..361
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 272..292
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 295..315
agents/contracts/lightmanager/mocks/i_light_manager.go on lines 288..308
agents/contracts/origin/mocks/i_origin.go on lines 132..152
agents/contracts/origin/mocks/i_origin.go on lines 155..175

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 326.

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 12 locations. Consider refactoring.
Open

func (_m *IGasOracle) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*gasoracle.GasOracleOwnershipTransferredIterator, error) {
    ret := _m.Called(opts, previousOwner, newOwner)

    var r0 *gasoracle.GasOracleOwnershipTransferredIterator
    if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) *gasoracle.GasOracleOwnershipTransferredIterator); ok {
Severity: Major
Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go and 11 other locations - About 4 hrs to fix
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 380..400
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 403..423
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 134..154
agents/contracts/inbox/mocks/i_inbox.go on lines 318..338
agents/contracts/inbox/mocks/i_inbox.go on lines 341..361
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 272..292
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 295..315
agents/contracts/lightmanager/mocks/i_light_manager.go on lines 288..308
agents/contracts/lightmanager/mocks/i_light_manager.go on lines 311..331
agents/contracts/origin/mocks/i_origin.go on lines 132..152
agents/contracts/origin/mocks/i_origin.go on lines 155..175

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 326.

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 12 locations. Consider refactoring.
Open

func (_m *IBondingManager) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*bondingmanager.BondingManagerOwnershipTransferredIterator, error) {
    ret := _m.Called(opts, previousOwner, newOwner)

    var r0 *bondingmanager.BondingManagerOwnershipTransferredIterator
    if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) *bondingmanager.BondingManagerOwnershipTransferredIterator); ok {
Severity: Major
Found in agents/contracts/bondingmanager/mocks/i_bonding_manager.go and 11 other locations - About 4 hrs to fix
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 380..400
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 134..154
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 157..177
agents/contracts/inbox/mocks/i_inbox.go on lines 318..338
agents/contracts/inbox/mocks/i_inbox.go on lines 341..361
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 272..292
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 295..315
agents/contracts/lightmanager/mocks/i_light_manager.go on lines 288..308
agents/contracts/lightmanager/mocks/i_light_manager.go on lines 311..331
agents/contracts/origin/mocks/i_origin.go on lines 132..152
agents/contracts/origin/mocks/i_origin.go on lines 155..175

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 326.

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 12 locations. Consider refactoring.
Open

func (_m *IInbox) FilterOwnershipTransferStarted(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*inbox.InboxOwnershipTransferStartedIterator, error) {
    ret := _m.Called(opts, previousOwner, newOwner)

    var r0 *inbox.InboxOwnershipTransferStartedIterator
    if rf, ok := ret.Get(0).(func(*bind.FilterOpts, []common.Address, []common.Address) *inbox.InboxOwnershipTransferStartedIterator); ok {
Severity: Major
Found in agents/contracts/inbox/mocks/i_inbox.go and 11 other locations - About 4 hrs to fix
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 380..400
agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 403..423
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 134..154
agents/contracts/gasoracle/mocks/i_gas_oracle.go on lines 157..177
agents/contracts/inbox/mocks/i_inbox.go on lines 341..361
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 272..292
agents/contracts/lightinbox/mocks/i_light_inbox.go on lines 295..315
agents/contracts/lightmanager/mocks/i_light_manager.go on lines 288..308
agents/contracts/lightmanager/mocks/i_light_manager.go on lines 311..331
agents/contracts/origin/mocks/i_origin.go on lines 132..152
agents/contracts/origin/mocks/i_origin.go on lines 155..175

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 326.

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

Function TestNewContext has a Cognitive Complexity of 44 (exceeds 20 allowed). Consider refactoring.
Open

func TestNewContext(t *testing.T) {
    unsetGithubRepo(t)
    t.Run("with GITHUB_EVENT_PATH set", func(t *testing.T) {
        res := mock.MustMarshal(github.PushEvent{
            Repo: &github.PushEventRepository{
Severity: Minor
Found in contrib/git-changes-action/detector/actionscore/context_test.go - About 4 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

Function Grid has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
Open

export const Grid = ({
  children,
  cols,
  gap,
  gapX,
Severity: Minor
Found in packages/explorer-ui/components/tailwind/Grid.tsx - About 4 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

  constructor(
    chains: ChainProvider[],
    addressMap: AddressMap,
    ctor: RouterConstructor
  ) {
Severity: Major
Found in packages/sdk-router/src/router/routerSet.ts and 1 other location - About 4 hrs to fix
packages/sdk-router/src/rfq/fastBridgeRouterSet.ts on lines 43..55

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 120.

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

  constructor(chains: ChainProvider[]) {
    super()
    this.routers = {}
    this.providers = {}
    chains.forEach(({ chainId, provider }) => {
Severity: Major
Found in packages/sdk-router/src/rfq/fastBridgeRouterSet.ts and 1 other location - About 4 hrs to fix
packages/sdk-router/src/router/routerSet.ts on lines 54..70

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 120.

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

export const getBridgeTransactionUrl = ({ hash, chainIdFrom, chainIdTo }) => {
  let url = TRANSACTION_PATH

  if (hash) {
    url += `/${hash}`
Severity: Major
Found in packages/explorer-ui/utils/urls/index.ts and 1 other location - About 4 hrs to fix
packages/explorer-ui/utils/urls/index.ts on lines 75..103

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 120.

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

export const getAddressesUrl = ({
  address,
  chainIdFrom,
  chainIdTo,
}: {
Severity: Major
Found in packages/explorer-ui/utils/urls/index.ts and 1 other location - About 4 hrs to fix
packages/explorer-ui/utils/urls/index.ts on lines 54..74

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 120.

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

Function standardizeResponse has 131 lines of code (exceeds 50 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: Major
Found in services/omnirpc/proxy/standardize.go - About 4 hrs to fix

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

    func (_m *EventDB) RetrieveReceiptsFromHeadRangeQuery(ctx context.Context, receiptFilter db.ReceiptFilter, startBlock uint64, endBlock uint64, page int) ([]types.Receipt, error) {
        ret := _m.Called(ctx, receiptFilter, startBlock, endBlock, page)
    
        var r0 []types.Receipt
        if rf, ok := ret.Get(0).(func(context.Context, db.ReceiptFilter, uint64, uint64, int) []types.Receipt); ok {
    Severity: Major
    Found in services/scribe/db/mocks/event_db.go and 2 other locations - About 4 hrs to fix
    services/scribe/db/mocks/event_db.go on lines 149..169
    services/scribe/db/mocks/event_db.go on lines 459..479

    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 324.

    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

    func (_m *EventDB) RetrieveReceiptsInRange(ctx context.Context, receiptFilter db.ReceiptFilter, startBlock uint64, endBlock uint64, page int) ([]types.Receipt, error) {
        ret := _m.Called(ctx, receiptFilter, startBlock, endBlock, page)
    
        var r0 []types.Receipt
        if rf, ok := ret.Get(0).(func(context.Context, db.ReceiptFilter, uint64, uint64, int) []types.Receipt); ok {
    Severity: Major
    Found in services/scribe/db/mocks/event_db.go and 2 other locations - About 4 hrs to fix
    services/scribe/db/mocks/event_db.go on lines 149..169
    services/scribe/db/mocks/event_db.go on lines 436..456

    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 324.

    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

    func (_m *EventDB) RetrieveEthTxsInRange(ctx context.Context, ethTxFilter db.EthTxFilter, startBlock uint64, endBlock uint64, page int) ([]db.TxWithBlockNumber, error) {
        ret := _m.Called(ctx, ethTxFilter, startBlock, endBlock, page)
    
        var r0 []db.TxWithBlockNumber
        if rf, ok := ret.Get(0).(func(context.Context, db.EthTxFilter, uint64, uint64, int) []db.TxWithBlockNumber); ok {
    Severity: Major
    Found in services/scribe/db/mocks/event_db.go and 2 other locations - About 4 hrs to fix
    services/scribe/db/mocks/event_db.go on lines 436..456
    services/scribe/db/mocks/event_db.go on lines 459..479

    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 324.

    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 base
    
    import (
        "github.com/synapsecns/sanguine/core/metrics"
        listenerDB "github.com/synapsecns/sanguine/ethergo/listener/db"
    Severity: Major
    Found in services/rfq/guard/guarddb/base/store.go and 1 other location - About 4 hrs to fix
    services/rfq/relayer/reldb/base/store.go on lines 1..44

    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 323.

    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 base
    
    import (
        "github.com/synapsecns/sanguine/core/metrics"
        listenerDB "github.com/synapsecns/sanguine/ethergo/listener/db"
    Severity: Major
    Found in services/rfq/relayer/reldb/base/store.go and 1 other location - About 4 hrs to fix
    services/rfq/guard/guarddb/base/store.go on lines 1..44

    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 323.

    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

    Function SynapseLogoSvg has 105 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const SynapseLogoSvg = () => {
      return (
        <svg
          width="39"
          height="36"
    Severity: Major
    Found in packages/explorer-ui/components/layouts/MainLayout/SynapseLogoSvg.tsx - About 4 hrs to fix

      Function SynapseLogoSvg has 105 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function SynapseLogoSvg() {
        return (
          <svg
            width="39"
            height="36"

        Function UniversalMoneyMarketsIcon has 105 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function UniversalMoneyMarketsIcon() {
          return (
            <svg
              width="335"
              height="196"
          Severity
          Category
          Status
          Source
          Language