status-im/status-go

View on GitHub

Showing 551 of 551 total issues

MockRPSLimitedEthClientInterface has 35 methods (exceeds 21 allowed). Consider refactoring.
Open

type MockRPSLimitedEthClientInterface struct {
    ctrl     *gomock.Controller
    recorder *MockRPSLimitedEthClientInterfaceMockRecorder
}
Severity: Minor
Found in rpc/chain/mock/client/ethclient/rps_limited_eth_client.go - About 4 hrs to fix

    MockRPSLimitedEthClientInterfaceMockRecorder has 34 methods (exceeds 21 allowed). Consider refactoring.
    Open

    type MockRPSLimitedEthClientInterfaceMockRecorder struct {
        mock *MockRPSLimitedEthClientInterface
    }
    Severity: Minor
    Found in rpc/chain/mock/client/ethclient/rps_limited_eth_client.go - About 4 hrs to fix

      SettingsAPI has 34 methods (exceeds 21 allowed). Consider refactoring.
      Open

      type SettingsAPI struct {
          messenger **protocol.Messenger
          db        *accounts.Database
          config    *params.NodeConfig
      }
      Severity: Minor
      Found in services/accounts/settings.go - About 4 hrs to fix

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

        func (m *Messenger) shouldSync() (bool, error) {
            // TODO (pablo) support community store node as well
            if m.mailserverCycle.activeMailserver == nil || !m.Online() {
                return false, nil
            }
        Severity: Minor
        Found in protocol/messenger_mailserver.go - About 4 hrs to fix

          AdminCommunityEventsSuite has 34 methods (exceeds 21 allowed). Consider refactoring.
          Open

          type AdminCommunityEventsSuite struct {
              EventSenderCommunityEventsSuiteBase
          }
          Severity: Minor
          Found in protocol/communities_messenger_admin_test.go - About 4 hrs to fix

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

            func (m *Messenger) fetchCollectibleOwner(contractAddress string, tokenID string, chainID uint64) ([]thirdparty.AccountBalance, error) {
                collectibleID, err := toCollectibleUniqueID(contractAddress, tokenID, chainID)
                if err != nil {
                    return nil, err
                }
            Severity: Minor
            Found in protocol/messenger_profile_showcase.go - About 4 hrs to fix

              MessengerContactRequestSuite has 34 methods (exceeds 21 allowed). Consider refactoring.
              Open

              type MessengerContactRequestSuite struct {
                  MessengerBaseTestSuite
              }
              Severity: Minor
              Found in protocol/messenger_contact_requests_test.go - About 4 hrs to fix

                TokenMasterCommunityEventsSuite has 34 methods (exceeds 21 allowed). Consider refactoring.
                Open

                type TokenMasterCommunityEventsSuite struct {
                    EventSenderCommunityEventsSuiteBase
                }
                Severity: Minor
                Found in protocol/communities_events_token_master_test.go - About 4 hrs to fix

                  File messenger_storenode_request_test.go has 989 lines of code (exceeds 900 allowed). Consider refactoring.
                  Open

                  package protocol
                  
                  import (
                      "context"
                      "fmt"
                  Severity: Major
                  Found in protocol/messenger_storenode_request_test.go - About 4 hrs to fix

                    File OwnerToken.go has 986 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 ownertoken
                    
                    
                    Severity: Major
                    Found in contracts/community-tokens/ownertoken/OwnerToken.go - About 4 hrs to fix

                      File messenger_mailserver.go has 986 lines of code (exceeds 900 allowed). Consider refactoring.
                      Open

                      package protocol
                      
                      import (
                          "context"
                          "fmt"
                      Severity: Major
                      Found in protocol/messenger_mailserver.go - About 4 hrs to fix

                        Manager has 33 methods (exceeds 21 allowed). Consider refactoring.
                        Open

                        type Manager struct {
                            balancefetcher.BalanceFetcher
                            db                   *sql.DB
                            RPCClient            rpc.ClientInterface
                            ContractMaker        *contracts.ContractMaker
                        Severity: Minor
                        Found in services/wallet/token/token.go - About 4 hrs to fix

                          MockEthClientInterface has 32 methods (exceeds 21 allowed). Consider refactoring.
                          Open

                          type MockEthClientInterface struct {
                              ctrl     *gomock.Controller
                              recorder *MockEthClientInterfaceMockRecorder
                          }
                          Severity: Minor
                          Found in rpc/chain/mock/client/ethclient/eth_client.go - About 3 hrs to fix

                            MessengerSignalsHandler has 32 methods (exceeds 21 allowed). Consider refactoring.
                            Open

                            type MessengerSignalsHandler struct{}
                            Severity: Minor
                            Found in services/ext/signal.go - About 3 hrs to fix

                              File Collectibles.go has 971 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 collectibles
                              
                              
                              Severity: Major
                              Found in contracts/community-tokens/collectibles/Collectibles.go - About 3 hrs to fix

                                CelerTransactor has 31 methods (exceeds 21 allowed). Consider refactoring.
                                Open

                                type CelerTransactor struct {
                                    contract *bind.BoundContract // Generic contract wrapper for the low level calls
                                }
                                Severity: Minor
                                Found in contracts/celer/bridge.go - About 3 hrs to fix

                                  CelerTransactorSession has 31 methods (exceeds 21 allowed). Consider refactoring.
                                  Open

                                  type CelerTransactorSession struct {
                                      Contract     *CelerTransactor  // Generic contract transactor binding to set the session for
                                      TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
                                  }
                                  Severity: Minor
                                  Found in contracts/celer/bridge.go - About 3 hrs to fix

                                    MockEthClientInterfaceMockRecorder has 31 methods (exceeds 21 allowed). Consider refactoring.
                                    Open

                                    type MockEthClientInterfaceMockRecorder struct {
                                        mock *MockEthClientInterface
                                    }
                                    Severity: Minor
                                    Found in rpc/chain/mock/client/ethclient/eth_client.go - About 3 hrs to fix

                                      Contact has 31 methods (exceeds 21 allowed). Consider refactoring.
                                      Open

                                      func (c *Contact) CanonicalImage(profilePicturesVisibility settings.ProfilePicturesVisibilityType) string {
                                          if profilePicturesVisibility == settings.ProfilePicturesVisibilityNone || (profilePicturesVisibility == settings.ProfilePicturesVisibilityContactsOnly && !c.added()) {
                                              return c.Identicon
                                          }
                                      
                                      
                                      Severity: Minor
                                      Found in protocol/contact.go - About 3 hrs to fix

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                        var bytesToTopicTests = []struct {
                                            data  []byte
                                            topic TopicType
                                        }{
                                            {topic: TopicType{0x8f, 0x9a, 0x2b, 0x7d}, data: []byte{0x8f, 0x9a, 0x2b, 0x7d}},
                                        Severity: Major
                                        Found in waku/common/topic_test.go and 1 other location - About 3 hrs to fix
                                        wakuv2/common/topic_test.go on lines 54..68

                                        Duplicated Code

                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                        Tuning

                                        This issue has a mass of 289.

                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                        Refactorings

                                        Further Reading

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language