status-im/status-go

View on GitHub

Showing 498 of 498 total issues

File messenger_handlers.go has 1120 lines of code (exceeds 900 allowed). Consider refactoring.
Open

//nolint
// Code generated by generate_handlers.go. DO NOT EDIT.
// source: generate_handlers.go

package protocol
Severity: Major
Found in protocol/messenger_handlers.go - About 7 hrs to fix

    File sync_device_test.go has 1116 lines of code (exceeds 900 allowed). Consider refactoring.
    Open

    package pairing
    
    import (
        "context"
        "encoding/json"
    Severity: Major
    Found in server/pairing/sync_device_test.go - About 7 hrs to fix

      ClientWithFallback has 52 methods (exceeds 21 allowed). Consider refactoring.
      Open

      type ClientWithFallback struct {
          ChainID         uint64
          main            *ethclient.Client
          fallback        *ethclient.Client
          mainLimiter     *RPCRpsLimiter
      Severity: Major
      Found in rpc/chain/client.go - About 7 hrs to fix

        sqlitePersistence has 52 methods (exceeds 21 allowed). Consider refactoring.
        Open

        func (db sqlitePersistence) saveProfileShowcasePreferencesClock(tx *sql.Tx, clock uint64) error {
            _, err := tx.Exec(upsertProfileShowcasePreferencesQuery, clock, clock)
            return err
        }
        Severity: Major
        Found in protocol/persistence_profile_showcase.go - About 7 hrs to fix

          HopL2ArbitrumBridgeSession has 51 methods (exceeds 21 allowed). Consider refactoring.
          Open

          type HopL2ArbitrumBridgeSession struct {
              Contract     *HopL2ArbitrumBridge // Generic contract binding to set the session for
              CallOpts     bind.CallOpts        // Call options to use throughout this session
              TransactOpts bind.TransactOpts    // Transaction auth options to use throughout this session
          }
          Severity: Major
          Found in contracts/hop/l2Contracts/l2ArbitrumBridge/l2ArbitrumBridge.go - About 7 hrs to fix

            File messenger_mention.go has 1102 lines of code (exceeds 900 allowed). Consider refactoring.
            Open

            package protocol
            
            // this is a reimplementation of the mention feature in status-react
            // reference implementation: https://github.com/status-im/status-react/blob/972347963498fc4a2bb8f85541e79ed0541698da/src/status_im/chat/models/mentions.cljs#L1
            import (
            Severity: Major
            Found in protocol/messenger_mention.go - About 6 hrs to fix

              HopL1HopBridgeSession has 49 methods (exceeds 21 allowed). Consider refactoring.
              Open

              type HopL1HopBridgeSession struct {
                  Contract     *HopL1HopBridge   // Generic contract binding to set the session for
                  CallOpts     bind.CallOpts     // Call options to use throughout this session
                  TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
              }
              Severity: Minor
              Found in contracts/hop/l1Contracts/l1HopBridge/l1HopBridge.go - About 6 hrs to fix

                Database has 49 methods (exceeds 21 allowed). Consider refactoring.
                Open

                type Database struct {
                    settings.DatabaseSettingsManager
                    *notificationssettings.NotificationsSettings
                    *walletsettings.WalletSettings
                    db *sql.DB
                Severity: Minor
                Found in multiaccounts/accounts/database.go - About 6 hrs to fix

                  StatusNode has 48 methods (exceeds 21 allowed). Consider refactoring.
                  Open

                  func (b *StatusNode) initServices(config *params.NodeConfig, mediaServer *server.MediaServer) error {
                      accountsFeed := &event.Feed{}
                      settingsFeed := &event.Feed{}
                      accDB, err := accounts.NewDB(b.appDB)
                      if err != nil {
                  Severity: Minor
                  Found in node/status_node_services.go - About 6 hrs to fix

                    HopL1Erc20BridgeSession has 46 methods (exceeds 21 allowed). Consider refactoring.
                    Open

                    type HopL1Erc20BridgeSession struct {
                        Contract     *HopL1Erc20Bridge // Generic contract binding to set the session for
                        CallOpts     bind.CallOpts     // Call options to use throughout this session
                        TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
                    }
                    Severity: Minor
                    Found in contracts/hop/l1Contracts/l1Erc20Bridge/l1Erc20Bridge.go - About 6 hrs to fix

                      HopL1EthBridgeSession has 45 methods (exceeds 21 allowed). Consider refactoring.
                      Open

                      type HopL1EthBridgeSession struct {
                          Contract     *HopL1EthBridge   // Generic contract binding to set the session for
                          CallOpts     bind.CallOpts     // Call options to use throughout this session
                          TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
                      }
                      Severity: Minor
                      Found in contracts/hop/l1Contracts/l1EthBridge/l1EthBridge.go - About 6 hrs to fix

                        GethWakuWrapper has 45 methods (exceeds 21 allowed). Consider refactoring.
                        Open

                        type GethWakuWrapper struct {
                            waku *waku.Waku
                        }
                        Severity: Minor
                        Found in eth-node/bridge/geth/waku.go - About 6 hrs to fix

                          gethWakuV2Wrapper has 45 methods (exceeds 21 allowed). Consider refactoring.
                          Open

                          type gethWakuV2Wrapper struct {
                              waku *wakuv2.Waku
                          }
                          Severity: Minor
                          Found in eth-node/bridge/geth/wakuv2.go - About 6 hrs to fix

                            TestClient has 45 methods (exceeds 21 allowed). Consider refactoring.
                            Open

                            type TestClient struct {
                                t *testing.T
                                // [][block, newBalance, nonceDiff]
                                balances                       map[common.Address][][]int
                                outgoingERC20Transfers         map[common.Address][]testERC20Transfer
                            Severity: Minor
                            Found in services/wallet/transfer/commands_sequential_test.go - About 6 hrs to fix

                              File messenger_contacts.go has 1065 lines of code (exceeds 900 allowed). Consider refactoring.
                              Open

                              package protocol
                              
                              import (
                                  "context"
                                  "crypto/ecdsa"
                              Severity: Major
                              Found in protocol/messenger_contacts.go - About 5 hrs to fix

                                MessengerSuite has 44 methods (exceeds 21 allowed). Consider refactoring.
                                Open

                                type MessengerSuite struct {
                                    MessengerBaseTestSuite
                                }
                                Severity: Minor
                                Found in protocol/messenger_test.go - About 5 hrs to fix

                                  File commands_sequential.go has 1057 lines of code (exceeds 900 allowed). Consider refactoring.
                                  Open

                                  package transfer
                                  
                                  import (
                                      "context"
                                      "math/big"
                                  Severity: Major
                                  Found in services/wallet/transfer/commands_sequential.go - About 5 hrs to fix

                                    Peer has 43 methods (exceeds 21 allowed). Consider refactoring.
                                    Open

                                    type Peer struct {
                                        host    common.WakuHost
                                        rw      p2p.MsgReadWriter
                                        p2pPeer *p2p.Peer
                                        logger  *zap.Logger
                                    Severity: Minor
                                    Found in waku/v1/peer.go - About 5 hrs to fix

                                      API has 43 methods (exceeds 21 allowed). Consider refactoring.
                                      Open

                                      type API struct {
                                          manager   *account.GethManager
                                          config    *params.NodeConfig
                                          db        *accounts.Database
                                          feed      *event.Feed
                                      Severity: Minor
                                      Found in services/accounts/accounts.go - About 5 hrs to fix

                                        MessengerCommunitiesTokenPermissionsSuite has 43 methods (exceeds 21 allowed). Consider refactoring.
                                        Open

                                        type MessengerCommunitiesTokenPermissionsSuite struct {
                                            suite.Suite
                                            owner *Messenger
                                            bob   *Messenger
                                            alice *Messenger
                                        Severity: Minor
                                        Found in protocol/communities_messenger_token_permissions_test.go - About 5 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language