Showing 1,971 of 13,422 total issues
Function constructJSON
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
const constructJSON = (swappableMap, exclusionList) => {
const result = {}
for (const chainA in swappableMap) {
for (const tokenA in swappableMap[chainA]) {
- Read upRead up
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
Config
has 51 methods (exceeds 20 allowed). Consider refactoring. Open
func (c Config) getChainConfigValue(chainID int, fieldName string) (interface{}, error) {
chainConfig, ok := c.Chains[chainID]
if ok {
value, err := getFieldValue(chainConfig, fieldName)
if err != nil {
Function executeBridge
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
const executeBridge = async () => {
let pendingPopup: any
const currentTimestamp: number = getUnixTimeMinutesFromNow(0)
File client.go
has 707 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated by github.com/Yamashou/gqlgenc, DO NOT EDIT.
package client
import (
Chain
has 49 methods (exceeds 20 allowed). Consider refactoring. Open
type Chain struct {
mock.Mock
}
File networks.ts
has 451 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { CHAINS } from '@synapsecns/synapse-constants'
const ChainId = CHAINS.ChainId
const ETH_CURRENCY_TEXT_CLASSNAME = 'text-[#5170ad] dark:text-[#78a5ff]'
Method ExecutorSuite.TestSendManagerMessage
has 195 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (e *ExecutorSuite) TestSendManagerMessage() {
// This test requires a call to anvil's evm.IncreaseTime() cheat code, so we should
// set up the backends with anvil.
testDone := false
File getters.go
has 698 lines of code (exceeds 500 allowed). Consider refactoring. Open
package relconfig
import (
"fmt"
"math/big"
File index.tsx
has 447 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { StandardPageContainer } from '@components/layouts/StandardPageContainer'
export const Terms = () => {
return (
<StandardPageContainer title="Terms of Service">
Method executionContext._Transaction
has 190 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) _Transaction(ctx context.Context, sel ast.SelectionSet, obj *model.Transaction) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, transactionImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Method executionContext._Transaction
has 190 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) _Transaction(ctx context.Context, sel ast.SelectionSet, obj *model.Transaction) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, transactionImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
File i_gas_oracle.go
has 685 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated by mockery v2.14.0. DO NOT EDIT.
package mocks
import (
Function Txs
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
export const Txs = () => {
const search = useSearchParams()
const p = Number(search.get('p'))
const hashSearch = String(search.get('hash'))
- Read upRead up
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
IOrigin
has 46 methods (exceeds 20 allowed). Consider refactoring. Open
type IOrigin struct {
mock.Mock
}
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:
- Read upRead up
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 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,
Function Token
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Token = () => {
const router = useRouter()
const { tokenAddress } = router.query
const search = useSearchParams()
const chain_id = Number(search.get('chainId')) || 1
Method executionContext._Receipt
has 175 lines of code (exceeds 50 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)
Method executionContext._Receipt
has 175 lines of code (exceeds 50 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)
File metered_evm_client.go
has 664 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated by mockery v2.14.0. DO NOT EDIT.
package mocks
import (