Showing 1,971 of 13,422 total issues
File poolMaster.ts
has 860 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Token } from '../../types'
import * as CHAINS from '../chains/master'
import {
BUSD,
USDC,
Method executableSchema.Complexity
has 417 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 {
Method executableSchema.Complexity
has 417 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 {
File miniChef.ts
has 779 lines of code (exceeds 250 allowed). Consider refactoring. Open
export const MINICHEF_ABI = [
{
inputs: [
{
internalType: 'contract IERC20',
Method BackfillSuite.TestBackfill
has 391 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (b *BackfillSuite) TestBackfill() {
testChainID := b.testBackend.GetBigChainID()
bridgeContract, bridgeRef := b.testDeployManager.GetTestSynapseBridge(b.GetTestContext(), b.testBackend)
bridgeV1Contract, bridgeV1Ref := b.testDeployManager.GetTestSynapseBridgeV1(b.GetTestContext(), b.testBackend)
File FastBridgeV2.ts
has 774 lines of code (exceeds 250 allowed). Consider refactoring. Open
export const FastBridgeV2Abi = [
{
inputs: [{ internalType: 'address', name: '_owner', type: 'address' }],
stateMutability: 'nonpayable',
type: 'constructor',
File FastBridgeV2.ts
has 774 lines of code (exceeds 250 allowed). Consider refactoring. Open
export const FastBridgeV2Abi = [
{
inputs: [{ internalType: 'address', name: '_owner', type: 'address' }],
stateMutability: 'nonpayable',
type: 'constructor',
File i_light_inbox.go
has 1011 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated by mockery v2.14.0. DO NOT EDIT.
package mocks
import (
Function StateManagedSwap
has 335 lines of code (exceeds 25 allowed). Consider refactoring. Open
const StateManagedSwap = () => {
const { address } = useAccount()
const { synapseSDK } = useSynapseContext()
const swapDisplayRef = useRef(null)
const quoteToastRef = useRef({ id: '' })
File simulated_test_backend.go
has 973 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Code generated by mockery v2.14.0. DO NOT EDIT.
package mocks
import (
Function Home
has 333 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Home = () => {
const [platform, setPlatform] = useState('ALL')
const [transactionsArr, setTransactionsArr] = useState([])
const [dailyDataArr, setDailyDataArr] = useState([])
const [kappa, setKappa] = useState('')
Method GuardSuite.TestUpdateAgentStatusOnRemote
has 356 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (g *GuardSuite) TestUpdateAgentStatusOnRemote() {
// This test requires a call to anvil's evm.IncreaseTime() cheat code, so we should
// set up the backends with anvil.
testDone := false
Method executionContext._Transaction
has a Cognitive Complexity of 97 (exceeds 20 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)
- 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
Method executionContext._Transaction
has a Cognitive Complexity of 97 (exceeds 20 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)
- 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
Method executionContext._Query
has a Cognitive Complexity of 95 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
Object: "Query",
})
- 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
Method executionContext._Query
has a Cognitive Complexity of 95 (exceeds 20 allowed). Consider refactoring. Open
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
Object: "Query",
})
- 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 fraud_test.go
has 939 lines of code (exceeds 500 allowed). Consider refactoring. Open
package guard_test
import (
"context"
"fmt"
Function ChainSummary
has 312 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const ChainSummary = () => {
const router = useRouter()
const { chainId: chainIdRouter } = router.query
const [platform, setPlatform] = useState('ALL')
const [transactionsArr, setTransactionsArr] = useState([])
Method executionContext._Query
has 328 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
Object: "Query",
})
Method executionContext._Query
has 328 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
Object: "Query",
})