status-im/status-go

View on GitHub

Showing 348 of 496 total issues

File messenger_test.go has 1967 lines of code (exceeds 900 allowed). Consider refactoring.
Open

package protocol

import (
    "context"
    "encoding/hex"
Severity: Major
Found in protocol/messenger_test.go - About 3 days to fix

    Messenger has 174 methods (exceeds 21 allowed). Consider refactoring.
    Open

    type Messenger struct {
        node                      types.Node
        server                    *p2p.Server
        peerStore                 *mailservers.PeerStore
        config                    *config
    Severity: Major
    Found in protocol/messenger.go - About 3 days to fix

      Community has 166 methods (exceeds 21 allowed). Consider refactoring.
      Open

      type Community struct {
          config     *Config
          mutex      sync.Mutex
          timesource common.TimeSource
          encryptor  DescriptionEncryptor
      Severity: Major
      Found in protocol/communities/community.go - About 3 days to fix

        File communities_events_utils_test.go has 1892 lines of code (exceeds 900 allowed). Consider refactoring.
        Open

        package protocol
        
        import (
            "context"
            "errors"
        Severity: Major
        Found in protocol/communities_events_utils_test.go - About 3 days to fix

          File communities_messenger_token_permissions_test.go has 1871 lines of code (exceeds 900 allowed). Consider refactoring.
          Open

          package protocol
          
          import (
              "bytes"
              "context"
          Severity: Major
          Found in protocol/communities_messenger_token_permissions_test.go - About 3 days to fix

            File tokenstore.go has 1783 lines of code (exceeds 900 allowed). Consider refactoring.
            Open

            package token
            
            import (
                "github.com/ethereum/go-ethereum/common"
            )
            Severity: Major
            Found in services/wallet/token/tokenstore.go - About 2 days to fix

              File persistence.go has 1757 lines of code (exceeds 900 allowed). Consider refactoring.
              Open

              package communities
              
              import (
                  "context"
                  "crypto/ecdsa"
              Severity: Major
              Found in protocol/communities/persistence.go - About 2 days to fix

                File persistence_test.go has 1673 lines of code (exceeds 900 allowed). Consider refactoring.
                Open

                package protocol
                
                import (
                    "bytes"
                    "database/sql"
                Severity: Major
                Found in protocol/persistence_test.go - About 2 days to fix

                  File uniswapv3pool.go has 1672 lines of code (exceeds 900 allowed). Consider refactoring.
                  Open

                  // Code generated - DO NOT EDIT.
                  // This file is a generated binding and any manual changes will be lost.
                  
                  package uniswapv3
                  
                  
                  Severity: Major
                  Found in contracts/uniswapV3/uniswapv3pool.go - About 2 days to fix

                    File commands_sequential_test.go has 1593 lines of code (exceeds 900 allowed). Consider refactoring.
                    Open

                    package transfer
                    
                    import (
                        "context"
                        "fmt"
                    Severity: Major
                    Found in services/wallet/transfer/commands_sequential_test.go - About 2 days to fix

                      Persistence has 119 methods (exceeds 21 allowed). Consider refactoring.
                      Open

                      type Persistence struct {
                          db *sql.DB
                      
                          recordBundleToCommunity func(*CommunityRecordBundle) (*Community, error)
                      }
                      Severity: Major
                      Found in protocol/communities/persistence.go - About 2 days to fix

                        File messenger_communities_import_discord.go has 1505 lines of code (exceeds 900 allowed). Consider refactoring.
                        Open

                        package protocol
                        
                        import (
                            "encoding/json"
                            "errors"
                        Severity: Major
                        Found in protocol/messenger_communities_import_discord.go - About 2 days to fix

                          GethStatusBackend has 107 methods (exceeds 21 allowed). Consider refactoring.
                          Open

                          type GethStatusBackend struct {
                              mu sync.Mutex
                              // rootDataDir is the same for all networks.
                              rootDataDir string
                              appDB       *sql.DB
                          Severity: Major
                          Found in api/geth_backend.go - About 2 days to fix

                            File database.go has 1492 lines of code (exceeds 900 allowed). Consider refactoring.
                            Open

                            package accounts
                            
                            import (
                                "database/sql"
                                "encoding/json"
                            Severity: Major
                            Found in multiaccounts/accounts/database.go - About 2 days to fix

                              File manager_test.go has 1480 lines of code (exceeds 900 allowed). Consider refactoring.
                              Open

                              package communities
                              
                              import (
                                  "bytes"
                                  "context"
                              Severity: Major
                              Found in protocol/communities/manager_test.go - About 1 day to fix

                                Waku has 100 methods (exceeds 21 allowed). Consider refactoring.
                                Open

                                type Waku struct {
                                    protocols []p2p.Protocol  // Peer description and parameters
                                    filters   *common.Filters // Message filters installed with Subscribe function
                                
                                    privateKeys map[string]*ecdsa.PrivateKey // Private key storage
                                Severity: Major
                                Found in waku/waku.go - About 1 day to fix

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

                                  func (db sqlitePersistence) buildMessagesQueryWithAdditionalFields(additionalSelectFields, whereAndTheRest string) string {
                                      allFields := db.tableUserMessagesAllFieldsJoin()
                                      if additionalSelectFields != "" {
                                          additionalSelectFields = "," + additionalSelectFields
                                      }
                                  Severity: Major
                                  Found in protocol/message_persistence.go - About 1 day to fix

                                    File gateway.pb.go has 1394 lines of code (exceeds 900 allowed). Consider refactoring.
                                    Open

                                    // Code generated by protoc-gen-go. DO NOT EDIT.
                                    // source: gateway.proto
                                    
                                    package cbridge
                                    
                                    
                                    Severity: Major
                                    Found in services/wallet/router/pathprocessor/cbridge/gateway.pb.go - About 1 day to fix

                                      File backend_test.go has 1390 lines of code (exceeds 900 allowed). Consider refactoring.
                                      Open

                                      package api
                                      
                                      import (
                                          "context"
                                          "crypto/sha256"
                                      Severity: Major
                                      Found in api/backend_test.go - About 1 day to fix

                                        Messenger has 90 methods (exceeds 21 allowed). Consider refactoring.
                                        Open

                                        func (m *Messenger) HandleMembershipUpdateMessage(messageState *ReceivedMessageState, rawMembershipUpdate *protobuf.MembershipUpdateMessage, statusMessage *v1protocol.StatusMessage) error {
                                            chat, _ := messageState.AllChats.Load(rawMembershipUpdate.ChatId)
                                        
                                            return m.HandleMembershipUpdate(messageState, chat, rawMembershipUpdate, m.systemMessagesTranslations)
                                        }
                                        Severity: Major
                                        Found in protocol/messenger_handler.go - About 1 day to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language