status-im/status-go

View on GitHub

Showing 515 of 515 total issues

MasterTokenSession has 26 methods (exceeds 21 allowed). Consider refactoring.
Open

type MasterTokenSession struct {
    Contract     *MasterToken      // 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/community-tokens/mastertoken/MasterToken.go - About 2 hrs to fix

    CelerCallerSession has 26 methods (exceeds 21 allowed). Consider refactoring.
    Open

    type CelerCallerSession struct {
        Contract *CelerCaller  // Generic contract caller binding to set the session for
        CallOpts bind.CallOpts // Call options to use throughout this session
    }
    Severity: Minor
    Found in contracts/celer/bridge.go - About 2 hrs to fix

      Uniswapv3Session has 26 methods (exceeds 21 allowed). Consider refactoring.
      Open

      type Uniswapv3Session struct {
          Contract     *Uniswapv3        // 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/uniswapV3/uniswapv3pool.go - About 2 hrs to fix

        HopL2ArbitrumBridgeCaller has 26 methods (exceeds 21 allowed). Consider refactoring.
        Open

        type HopL2ArbitrumBridgeCaller struct {
            contract *bind.BoundContract // Generic contract wrapper for the low level calls
        }
        Severity: Minor
        Found in contracts/hop/l2Contracts/l2ArbitrumBridge/l2ArbitrumBridge.go - About 2 hrs to fix

          File community_encryption_key_action_test.go has 933 lines of code (exceeds 900 allowed). Consider refactoring.
          Open

          package communities
          
          import (
              "crypto/ecdsa"
              "reflect"
          Severity: Major
          Found in protocol/communities/community_encryption_key_action_test.go - About 2 hrs to fix

            HopL2ArbitrumBridgeTransactor has 25 methods (exceeds 21 allowed). Consider refactoring.
            Open

            type HopL2ArbitrumBridgeTransactor struct {
                contract *bind.BoundContract // Generic contract wrapper for the low level calls
            }
            Severity: Minor
            Found in contracts/hop/l2Contracts/l2ArbitrumBridge/l2ArbitrumBridge.go - About 2 hrs to fix

              HopL1EthBridgeCaller has 25 methods (exceeds 21 allowed). Consider refactoring.
              Open

              type HopL1EthBridgeCaller struct {
                  contract *bind.BoundContract // Generic contract wrapper for the low level calls
              }
              Severity: Minor
              Found in contracts/hop/l1Contracts/l1EthBridge/l1EthBridge.go - About 2 hrs to fix

                HopL1EthBridgeCallerSession has 25 methods (exceeds 21 allowed). Consider refactoring.
                Open

                type HopL1EthBridgeCallerSession struct {
                    Contract *HopL1EthBridgeCaller // Generic contract caller binding to set the session for
                    CallOpts bind.CallOpts         // Call options to use throughout this session
                }
                Severity: Minor
                Found in contracts/hop/l1Contracts/l1EthBridge/l1EthBridge.go - About 2 hrs to fix

                  HopL2ArbitrumBridgeTransactorSession has 25 methods (exceeds 21 allowed). Consider refactoring.
                  Open

                  type HopL2ArbitrumBridgeTransactorSession struct {
                      Contract     *HopL2ArbitrumBridgeTransactor // 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/hop/l2Contracts/l2ArbitrumBridge/l2ArbitrumBridge.go - About 2 hrs to fix

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

                    func (m *Messenger) mailserversByFleet(fleet string) []mailservers.Mailserver {
                        return mailservers.DefaultMailserversByFleet(fleet)
                    }
                    Severity: Minor
                    Found in protocol/messenger_mailserver_cycle.go - About 2 hrs to fix

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

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

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

                        func (p *Peer) handleMessagesCode(packet p2p.Msg) error {
                            // decode the contained envelopes
                            data, err := ioutil.ReadAll(packet.Payload)
                            if err != nil {
                                common.EnvelopesRejectedCounter.WithLabelValues("failed_read").Inc()
                        Severity: Major
                        Found in waku/v1/peer.go and 1 other location - About 2 hrs to fix
                        waku/v0/peer.go on lines 253..274

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

                        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

                        package migrations
                        
                        import (
                            "database/sql"
                        
                        
                        Severity: Major
                        Found in appdatabase/migrations/migrate.go and 1 other location - About 2 hrs to fix
                        walletdatabase/migrations/migrate.go on lines 1..30

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

                        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 (p *Peer) handleMessagesCode(packet p2p.Msg) error {
                            // decode the contained envelopes
                            data, err := ioutil.ReadAll(packet.Payload)
                            if err != nil {
                                common.EnvelopesRejectedCounter.WithLabelValues("failed_read").Inc()
                        Severity: Major
                        Found in waku/v0/peer.go and 1 other location - About 2 hrs to fix
                        waku/v1/peer.go on lines 289..310

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

                        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

                        package migrations
                        
                        import (
                            "database/sql"
                        
                        
                        Severity: Major
                        Found in walletdatabase/migrations/migrate.go and 1 other location - About 2 hrs to fix
                        appdatabase/migrations/migrate.go on lines 1..30

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

                        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 4 locations. Consider refactoring.
                        Open

                        package main
                        
                        import (
                            "fmt"
                            "os"
                        Severity: Major
                        Found in cmd/statusd/flags.go and 3 other locations - About 2 hrs to fix
                        cmd/ping-community/flags.go on lines 1..37
                        cmd/populate-db/flags.go on lines 1..37
                        cmd/spiff-workflow/flags.go on lines 1..37

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

                        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 4 locations. Consider refactoring.
                        Open

                        package main
                        
                        import (
                            "fmt"
                            "os"
                        Severity: Major
                        Found in cmd/spiff-workflow/flags.go and 3 other locations - About 2 hrs to fix
                        cmd/ping-community/flags.go on lines 1..37
                        cmd/populate-db/flags.go on lines 1..37
                        cmd/statusd/flags.go on lines 1..37

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

                        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 4 locations. Consider refactoring.
                        Open

                        package main
                        
                        import (
                            "fmt"
                            "os"
                        Severity: Major
                        Found in cmd/ping-community/flags.go and 3 other locations - About 2 hrs to fix
                        cmd/populate-db/flags.go on lines 1..37
                        cmd/spiff-workflow/flags.go on lines 1..37
                        cmd/statusd/flags.go on lines 1..37

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

                        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 4 locations. Consider refactoring.
                        Open

                        package main
                        
                        import (
                            "fmt"
                            "os"
                        Severity: Major
                        Found in cmd/populate-db/flags.go and 3 other locations - About 2 hrs to fix
                        cmd/ping-community/flags.go on lines 1..37
                        cmd/spiff-workflow/flags.go on lines 1..37
                        cmd/statusd/flags.go on lines 1..37

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

                        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 (p *Peer) handleMessageResponseCode(packet p2p.Msg) error {
                            var resp MultiVersionResponse
                            if err := packet.Decode(&resp); err != nil {
                                common.EnvelopesRejectedCounter.WithLabelValues("failed_read").Inc()
                                return fmt.Errorf("invalid response message: %v", err)
                        Severity: Major
                        Found in waku/v0/peer.go and 1 other location - About 2 hrs to fix
                        waku/v1/peer.go on lines 312..330

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

                        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