status-im/status-go

View on GitHub

Showing 512 of 512 total issues

Method ArchiveFileManagerNop.CreateHistoryArchiveTorrentFromMessages has 7 arguments (exceeds 6 allowed). Consider refactoring.
Open

func (amm *ArchiveFileManagerNop) CreateHistoryArchiveTorrentFromMessages(communityID types.HexBytes, messages []*types.Message, topics []types.TopicType, startDate time.Time, endDate time.Time, partition time.Duration, encrypt bool) ([]string, error) {
Severity: Major
Found in protocol/communities/manager_archive_file_nop.go - About 35 mins to fix

    Function NewService has 7 arguments (exceeds 6 allowed). Consider refactoring.
    Open

    func NewService(appDB *sql.DB, accountsDB *accounts.Database, rpcClient *rpc.Client, config *params.NodeConfig, accountsManager *account.GethManager, rpcFiltersSrvc *rpcfilters.Service, transactor *transactions.Transactor) *Service {
    Severity: Major
    Found in services/web3provider/service.go - About 35 mins to fix

      Function findBlocksWithEthTransfers has 7 arguments (exceeds 6 allowed). Consider refactoring.
      Open

      func findBlocksWithEthTransfers(parent context.Context, client balance.Reader, cache balance.Cacher,
          account common.Address, low, high *big.Int, noLimit bool, threadLimit uint32) (
      Severity: Major
      Found in services/wallet/transfer/concurrent.go - About 35 mins to fix

        Function toChainBalance has 7 arguments (exceeds 6 allowed). Consider refactoring.
        Open

            balances map[uint64]map[common.Address]map[common.Address]*hexutil.Big,
            tok *token.Token,
            address common.Address,
            decimals uint,
            cachedTokens map[common.Address][]token.StorageToken,
        Severity: Major
        Found in services/wallet/reader.go - About 35 mins to fix

          Function NewService has 7 arguments (exceeds 6 allowed). Consider refactoring.
          Open

          func NewService(rpcClient *rpc.Client, accountsManager *account.GethManager, pendingTracker *transactions.PendingTxTracker,
              config *params.NodeConfig, appDb *sql.DB, walletFeed *event.Feed, transactor *transactions.Transactor) *Service {
          Severity: Major
          Found in services/communitytokens/service.go - About 35 mins to fix

            Function NewController has 7 arguments (exceeds 6 allowed). Consider refactoring.
            Open

                db *sql.DB,
                walletFeed *event.Feed,
                accountsDB *accounts.Database,
                accountsFeed *event.Feed,
                settingsFeed *event.Feed,
            Severity: Major
            Found in services/wallet/collectibles/controller.go - About 35 mins to fix

              Method API.GetBalanceHistoryRange has 7 arguments (exceeds 6 allowed). Consider refactoring.
              Open

              func (api *API) GetBalanceHistoryRange(ctx context.Context, chainIDs []uint64, addresses []common.Address, tokenSymbol string, currencySymbol string, fromTimestamp uint64, _ uint64) ([]*history.ValuePoint, error) {
              Severity: Major
              Found in services/wallet/api.go - About 35 mins to fix

                Method Service.deployOwnerTokenGasUnits has 7 arguments (exceeds 6 allowed). Consider refactoring.
                Open

                func (s *Service) deployOwnerTokenGasUnits(ctx context.Context, chainID uint64, fromAddress string,
                    ownerTokenParameters DeploymentParameters, masterTokenParameters DeploymentParameters,
                    communityID string, signerPubKey string) (uint64, error) {
                Severity: Major
                Found in services/communitytokens/estimations.go - About 35 mins to fix

                  Method Service.estimateMethodForTokenInstance has 7 arguments (exceeds 6 allowed). Consider refactoring.
                  Open

                  func (s *Service) estimateMethodForTokenInstance(ctx context.Context, contractInstance TokenInstance, chainID uint64, contractAddress string, fromAddress string, methodName string, args ...interface{}) (uint64, error) {
                  Severity: Major
                  Found in services/communitytokens/estimations.go - About 35 mins to fix

                    Method ArchiveFileManager.CreateHistoryArchiveTorrentFromMessages has 7 arguments (exceeds 6 allowed). Consider refactoring.
                    Open

                    func (m *ArchiveFileManager) CreateHistoryArchiveTorrentFromMessages(communityID types.HexBytes, messages []*types.Message, topics []types.TopicType, startDate time.Time, endDate time.Time, partition time.Duration, encrypt bool) ([]string, error) {
                    Severity: Major
                    Found in protocol/communities/manager_archive_file.go - About 35 mins to fix

                      Method Messenger.outputToCSV has 7 arguments (exceeds 6 allowed). Consider refactoring.
                      Open

                      func (m *Messenger) outputToCSV(timestamp uint32, messageID types.HexBytes, from string, topic types.TopicType, chatID string, msgType protobuf.ApplicationMetadataMessage_Type, parsedMessage interface{}) {
                      Severity: Major
                      Found in protocol/messenger.go - About 35 mins to fix

                        Function NewMessenger has 7 arguments (exceeds 6 allowed). Consider refactoring.
                        Open

                            nodeName string,
                            identity *ecdsa.PrivateKey,
                            node types.Node,
                            installationID string,
                            peerStore *mailservers.PeerStore,
                        Severity: Major
                        Found in protocol/messenger.go - About 35 mins to fix

                          Function applyStyleTag has 7 arguments (exceeds 6 allowed). Consider refactoring.
                          Open

                          func applyStyleTag(data *textMeta, idx int, pos int, c string, len int, start bool, end bool) int {
                          Severity: Major
                          Found in protocol/messenger_mention.go - About 35 mins to fix

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

                            func (t *Transport) SendMessagesRequestForTopics(
                                ctx context.Context,
                                peerID []byte,
                                from, to uint32,
                                previousCursor []byte,
                            Severity: Minor
                            Found in protocol/transport/transport.go and 2 other locations - About 35 mins to fix
                            protocol/messenger_mailserver.go on lines 665..676
                            protocol/messenger_mailserver_processMailserverBatch_test.go on lines 38..58

                            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 107.

                            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

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

                            func (t *mockTransport) SendMessagesRequestForTopics(
                                ctx context.Context,
                                peerID []byte,
                                from, to uint32,
                                previousCursor []byte,
                            Severity: Minor
                            Found in protocol/messenger_mailserver_processMailserverBatch_test.go and 2 other locations - About 35 mins to fix
                            protocol/messenger_mailserver.go on lines 665..676
                            protocol/transport/transport.go on lines 545..566

                            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 107.

                            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

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

                                SendMessagesRequestForTopics(
                                    ctx context.Context,
                                    peerID []byte,
                                    from, to uint32,
                                    previousCursor []byte,
                            Severity: Minor
                            Found in protocol/messenger_mailserver.go and 2 other locations - About 35 mins to fix
                            protocol/messenger_mailserver_processMailserverBatch_test.go on lines 38..58
                            protocol/transport/transport.go on lines 545..566

                            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 107.

                            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

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

                                for rows.Next() {
                                    emojiReaction := NewEmojiReaction()
                                    err := rows.Scan(&emojiReaction.Clock,
                                        &emojiReaction.From,
                                        &emojiReaction.Type,
                            Severity: Minor
                            Found in protocol/message_persistence.go and 2 other locations - About 35 mins to fix
                            protocol/message_persistence.go on lines 1376..1390
                            protocol/message_persistence.go on lines 1506..1520

                            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 104.

                            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

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

                                for rows.Next() {
                                    emojiReaction := NewEmojiReaction()
                                    err := rows.Scan(&emojiReaction.Clock,
                                        &emojiReaction.From,
                                        &emojiReaction.Type,
                            Severity: Minor
                            Found in protocol/message_persistence.go and 2 other locations - About 35 mins to fix
                            protocol/message_persistence.go on lines 1426..1440
                            protocol/message_persistence.go on lines 1506..1520

                            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 104.

                            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

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

                                for rows.Next() {
                                    emojiReaction := NewEmojiReaction()
                                    err := rows.Scan(&emojiReaction.Clock,
                                        &emojiReaction.From,
                                        &emojiReaction.Type,
                            Severity: Minor
                            Found in protocol/message_persistence.go and 2 other locations - About 35 mins to fix
                            protocol/message_persistence.go on lines 1376..1390
                            protocol/message_persistence.go on lines 1426..1440

                            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 104.

                            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

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

                            func (api *PublicWakuAPI) GetPrivateKey(ctx context.Context, id string) (hexutil.Bytes, error) {
                                key, err := api.w.GetPrivateKey(id)
                                if err != nil {
                                    return hexutil.Bytes{}, err
                                }
                            Severity: Minor
                            Found in waku/api.go and 1 other location - About 35 mins to fix
                            wakuv2/api.go on lines 126..132

                            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 103.

                            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