Showing 1,971 of 13,422 total issues
Function Start
has 12 return statements (exceeds 4 allowed). Open
Open
func Start(ctx context.Context, cfg Config, handler metrics.Handler) error {
logger.Warnf("starting api server")
router := ginhelper.New(logger)
// wrap gin with metrics
router.GET(ginhelper.MetricsEndpoint, gin.WrapH(handler.Handler()))
Method Indexer.Index
has 12 return statements (exceeds 4 allowed). Open
Open
func (x *Indexer) Index(parentCtx context.Context, startHeight uint64, endHeight uint64) (err error) {
ctx, span := x.handler.Tracer().Start(parentCtx, "contract.Backfill", trace.WithAttributes(
attribute.Int("chain", int(x.indexerConfig.ChainID)),
attribute.String("address", x.addressesToString(x.indexerConfig.Addresses)),
attribute.Int("start", int(startHeight)),
Method exporter.fetchRelayerBalances
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (e *exporter) fetchRelayerBalances(ctx context.Context, url string) error {
// Fetch relayer addresses
quotes, err := e.fetchAllQuotes(ctx, url)
if err != nil {
return fmt.Errorf("could not fetch relayer addresses: %w", err)
Method Executor.setMinimumTime
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (e Executor) setMinimumTime(parentCtx context.Context, chainID uint32) (err error) {
backoffInterval := time.Duration(0)
for {
select {
Function CreateCollection
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func CreateCollection() ([]byte, error) {
collection, err := postman.ParseCollection(bytes.NewReader(ethCollection))
if err != nil {
return nil, fmt.Errorf("could not parse collection: %w", err)
}
Method Manager.generateActiveRFQ
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (m *Manager) generateActiveRFQ(ctx context.Context, msg *model.ActiveRFQMessage) (resp *model.ActiveRFQMessage, err error) {
ctx, span := m.metricsHandler.Tracer().Start(ctx, "generateActiveRFQ", trace.WithAttributes(
attribute.String("op", msg.Op),
attribute.String("content", string(msg.Content)),
))
Method BackfillSuite.redeemParity
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (b *BackfillSuite) redeemParity(log *types.Log, parser *parser.BridgeParser, chainID uint32, useV1 bool) error {
// parse the log
if useV1 {
parsedLog, err := parser.FiltererV1.ParseTokenRedeem(*log)
if err != nil {
Function formatBigIntToString
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatBigIntToString = (
bi: bigint,
nativePrecision: number,
decimalPlaces?: number
) => {
Function constructor
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor({
addresses,
wrapperAddresses,
decimals,
symbol,
Method captureTransport.RoundTrip
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (t *captureTransport) RoundTrip(req *http.Request) (_ *http.Response, err error) {
var response string
_, span := t.metrics.Tracer().Start(req.Context(), RequestSpanName)
defer func() {
Function getActiveStyleForButton
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getActiveStyleForButton = (color: string) => {
switch (color) {
case ColorOptions.ETH:
return 'bg-[#5170ad44] dark:bg-[#5170ad44] border-[#5170ad] dark:border-[#5170ad]'
case ColorOptions.RED:
Function getHoverStyleForButton
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getHoverStyleForButton = (color: string) => {
switch (color) {
case ColorOptions.ETH:
return 'hover:bg-[#5170ad44] hover:dark:bg-[#5170ad44] hover:border-[#5170ad] hover:dark:border-[#5170ad]'
case ColorOptions.RED:
Function WideSupportIcon
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function WideSupportIcon() {
return (
<svg
width="34"
height="34"
Function SynapseCircuit
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function SynapseCircuit() {
return (
<svg
width="100%"
height="100%"
Function SecureIcon
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function SecureIcon() {
return (
<svg
width="28"
height="32"
Function ExtensibleIcon
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function ExtensibleIcon() {
return (
<svg
width="36"
height="36"
Function GeneralizedIcon
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function GeneralizedIcon() {
return (
<svg
width="32"
height="37"
Function DeveloperIcon
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function DeveloperIcon() {
return (
<svg
width="38"
height="38"
Function SocialButtons
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function SocialButtons() {
return (
<Grid cols={{ xs: 2, sm: 1 }} gapY={'1'}>
<MiniInfoItem
href={SYNAPSE_DOCS_URL}
Function generateMessageBusQuery
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func generateMessageBusQuery(chainID []*int, address *string, startTime *int, endTime *int, messageID *string, pending bool, reverted bool, txHash *string, page int) string {