Showing 1,971 of 13,422 total issues
Function Txs
has 198 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Txs = () => {
const search = useSearchParams()
const p = Number(search.get('p'))
const hashSearch = String(search.get('hash'))
ILightInbox
has 55 methods (exceeds 20 allowed). Consider refactoring. Open
type ILightInbox struct {
mock.Mock
}
File executor.go
has 743 lines of code (exceeds 500 allowed). Consider refactoring. Open
package executor
import (
"context"
"encoding/json"
File resolvers.ts
has 492 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { sql } from 'kysely'
import { db } from '../db'
// typical fields to return for a BridgeRequest
File chains.ts
has 491 lines of code (exceeds 250 allowed). Consider refactoring. Open
import _ from 'lodash'
import { Chain } from '../types'
import { getOmniRpcUrl } from '../utils/getOmniRpcUrl'
File chains.ts
has 490 lines of code (exceeds 250 allowed). Consider refactoring. Open
import _ from 'lodash'
import { Chain } from 'types'
export const ETHEREUM: Chain = {
id: 1,
Method Bot.rfqRefund
has a Cognitive Complexity of 65 (exceeds 20 allowed). Consider refactoring. Open
func (b *Bot) rfqRefund() *slacker.CommandDefinition {
return &slacker.CommandDefinition{
Command: "refund <tx>",
Description: "refund a quote request",
Examples: []string{"refund 0x1234"},
- 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
Function ChainSummary
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
export const ChainSummary = () => {
const router = useRouter()
const { chainId: chainIdRouter } = router.query
const [platform, setPlatform] = useState('ALL')
const [transactionsArr, setTransactionsArr] = useState([])
- 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 chains.ts
has 485 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable */
const CustomColors = {
CUSTOM_YELLOW: '[#ecae0b]',
CUSTOM_YELLOW_DARK: '[#3c3c44]',
ETH_BASE: '[#5170ad]',
Method inventoryManagerImpl.ApproveAllTokens
has a Cognitive Complexity of 64 (exceeds 20 allowed). Consider refactoring. Open
func (i *inventoryManagerImpl) ApproveAllTokens(ctx context.Context) (err error) {
ctx, span := i.handler.Tracer().Start(ctx, "approveAllTokens")
defer func() {
metrics.EndSpanWithErr(span, err)
}()
- 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
Function CCTPFlow
has 189 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const CCTPFlow = () => {
return (
<svg
width="100%"
viewBox="-240 0 480 164"
File generated.ts
has 480 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { api } from '@/slices/api/slice'
export type Maybe<T> = T | null
export type InputMaybe<T> = Maybe<T>
export type Exact<T extends { [key: string]: unknown }> = {
[K in keyof T]: T[K]
File index.tsx
has 477 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { useState } from 'react'
import { CHAINS } from '@synapsecns/synapse-constants'
import TextField from '@mui/material/TextField'
import {
inputStyle,
Method executableSchema.Complexity
has 87 return statements (exceeds 4 allowed). 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 87 return statements (exceeds 4 allowed). 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 {
Function RFQFlow
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const RFQFlow = () => {
return (
<svg
width="100%"
viewBox="-240 0 480 224"
Function RFQFlow
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const RFQFlow = () => {
return (
<svg
width="100%"
viewBox="-240 0 480 224"
File quoter.go
has 721 lines of code (exceeds 500 allowed). Consider refactoring. Open
// Package quoter submits quotes to the RFQ API for which assets the relayer is willing to relay.
package quoter
import (
"context"
Function constructJSON
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
const constructJSON = (swappableMap, exclusionList) => {
const result = {}
// Iterate through the chains
for (const chainA in swappableMap) {
- 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
Function constructJSON
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
const constructJSON = (
swappableMap,
exclusionList
): StringifiedBridgeRoutes => {
const result = {}
- 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"