Showing 1,971 of 13,422 total issues
Method executionContext._Log
has 173 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (ec *executionContext) _Log(ctx context.Context, sel ast.SelectionSet, obj *model.Log) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, logImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Method executionContext._Log
has 173 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (ec *executionContext) _Log(ctx context.Context, sel ast.SelectionSet, obj *model.Log) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, logImplementors)
out := graphql.NewFieldSet(fields)
deferred := make(map[string]*graphql.FieldSet)
Method executionContext.field_Query_bridgeTransactions_args
has a Cognitive Complexity of 54 (exceeds 20 allowed). Consider refactoring. Open
Open
func (ec *executionContext) field_Query_bridgeTransactions_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["chainIDFrom"]; ok {
- 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 resolver_test.go
has 659 lines of code (exceeds 500 allowed). Consider refactoring. Open
Open
package api_test
import (
gosql "database/sql"
"fmt"
File SynapseCCTPRouter.ts
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
BaseContract,
File reducer.ts
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
import { BridgeableToken } from 'types'
import { getFromTokens } from '@/utils/routeMaker/getFromTokens'
import { findTokenByRouteSymbol } from '@/utils/findTokenByRouteSymbol'
Method ExecutorSuite.TestMerkleInsert
has 168 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (e *ExecutorSuite) TestMerkleInsert() {
// TODO (joe and lex): FIX ME
// e.T().Skip()
testDone := false
defer func() {
Method executionContext.field_Query_bridgeTransactions_args
has 165 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (ec *executionContext) field_Query_bridgeTransactions_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["chainIDFrom"]; ok {
OptionBuilder
has 41 methods (exceeds 20 allowed). Consider refactoring. Open
Open
type OptionBuilder struct {
generalOptions
evmOptions
executorOptions
serverOptions
File index.tsx
has 394 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { useAccount } from 'wagmi'
import toast from 'react-hot-toast'
import { useRouter } from 'next/router'
import { useTranslations } from 'next-intl'
import deepmerge from 'deepmerge'
Function Privacy
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Privacy = () => {
return (
<StandardPageContainer title="Privacy Policy">
<p className="text-lg font-medium text-white ">
Last updated: January, 2023
File usdtAbi.ts
has 390 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export const USDT_ABI = [
{
constant: true,
inputs: [],
name: 'name',
Method SubmitterSuite.TestSetGasPrice
has 157 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (s *SubmitterSuite) TestSetGasPrice() {
wall, err := wallet.FromRandom()
s.Require().NoError(err)
signer := localsigner.NewSigner(wall.PrivateKey())
Function BridgeTransactionButton
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
Open
export const BridgeTransactionButton = ({
approveTxn,
executeBridge,
isApproved,
isBridgePaused,
- 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 ExecutorSuite.TestExecutor
has 156 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (e *ExecutorSuite) TestExecutor() {
// e.T().Skip()
testDone := false
defer func() {
testDone = true
File DestinationAddressInput.tsx
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { useState, useRef, useEffect } from 'react'
import { isNull, isString } from 'lodash'
import { useTranslations } from 'next-intl'
import { useAppDispatch } from '@/store/hooks'
MeteredEVMClient
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
Open
type MeteredEVMClient struct {
mock.Mock
}
File generateMaps.js
has 379 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const { ethers } = require('ethers')
const { prettyPrintTS } = require('./utils/prettyPrintTs')
const { fetchRfqData } = require('./utils/fetchRfqData')
// Provider URLs
Function TestNewContext
has 151 lines of code (exceeds 50 allowed). Consider refactoring. Open
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{
Method executionContext._Query
has 58 return statements (exceeds 4 allowed). Open
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",
})