waku-org/go-waku

View on GitHub

Showing 400 of 400 total issues

Function waku_filter_unsubscribe_all has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

func waku_filter_unsubscribe_all(ctx unsafe.Pointer, peerID *C.char, ms C.int, cb C.WakuCallBack, userData unsafe.Pointer) C.int {
Severity: Minor
Found in library/c/api_filter.go - About 35 mins to fix

    Function lightpushPublish has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    func lightpushPublish(instance *WakuInstance, msg *pb.WakuMessage, pubsubTopic string, peerID string, ms int) (string, error) {
    Severity: Minor
    Found in library/lightpush.go - About 35 mins to fix

      Function NewPairing has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func NewPairing(myStaticKey n.Keypair, myEphemeralKey n.Keypair, opts PairingParameterOption, messenger NoiseMessenger, logger *zap.Logger) (*Pairing, error) {
      Severity: Minor
      Found in waku/v2/protocol/noise/pairing.go - About 35 mins to fix

        Function waku_connect has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        func waku_connect(ctx unsafe.Pointer, address *C.char, ms C.int, cb C.WakuCallBack, userData unsafe.Pointer) C.int {
        Severity: Minor
        Found in library/c/api.go - About 35 mins to fix

          Function waku_filter_ping has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          func waku_filter_ping(ctx unsafe.Pointer, peerID *C.char, ms C.int, cb C.WakuCallBack, userData unsafe.Pointer) C.int {
          Severity: Minor
          Found in library/c/api_filter.go - About 35 mins to fix

            Method WakuFilterLightNode.request has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            func (wf *WakuFilterLightNode) request(ctx context.Context, requestID []byte,
                reqType pb.FilterSubscribeRequest_FilterSubscribeType, contentFilter protocol.ContentFilter, peerID peer.ID) error {
            Severity: Minor
            Found in waku/v2/protocol/filter/client.go - About 35 mins to fix

              Function waku_encode_symmetric has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              func waku_encode_symmetric(messageJSON *C.char, symmetricKey *C.char, optionalSigningKey *C.char, cb C.WakuCallBack, userData unsafe.Pointer) C.int {
              Severity: Minor
              Found in library/c/api_encoding.go - About 35 mins to fix

                Function LightpushPublish has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                func LightpushPublish(instance *WakuInstance, messageJSON string, pubsubTopic string, peerID string, ms int) (string, error) {
                Severity: Minor
                Found in library/lightpush.go - About 35 mins to fix

                  Function waku_add_peer has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  func waku_add_peer(ctx unsafe.Pointer, address *C.char, protocolID *C.char, cb C.WakuCallBack, userData unsafe.Pointer) C.int {
                  Severity: Minor
                  Found in library/c/api.go - About 35 mins to fix

                    Function waku_encode_asymmetric has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    func waku_encode_asymmetric(messageJSON *C.char, publicKey *C.char, optionalSigningKey *C.char, cb C.WakuCallBack, userData unsafe.Pointer) C.int {
                    Severity: Minor
                    Found in library/c/api_encoding.go - About 35 mins to fix

                      Function NewContentTopic has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      func NewContentTopic(applicationName string, applicationVersion string,
                          contentTopicName string, encoding string, opts ...ContentTopicOption) (ContentTopic, error) {
                      Severity: Minor
                      Found in waku/v2/protocol/content_topic.go - About 35 mins to fix

                        Method WakuFilterFullNode.reply has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        func (wf *WakuFilterFullNode) reply(ctx context.Context, stream network.Stream, request *pb.FilterSubscribeRequest, statusCode int, description ...string) {
                        Severity: Minor
                        Found in waku/v2/protocol/filter/server.go - About 35 mins to fix

                          Function NewWakuLightPush has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          func NewWakuLightPush(relay *relay.WakuRelay, pm *peermanager.PeerManager, reg prometheus.Registerer, log *zap.Logger, opts ...Option) *WakuLightPush {
                          Severity: Minor
                          Found in waku/v2/protocol/lightpush/waku_lightpush.go - About 35 mins to fix

                            Function waku_connect_peerid has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            func waku_connect_peerid(ctx unsafe.Pointer, peerID *C.char, ms C.int, cb C.WakuCallBack, userData unsafe.Pointer) C.int {
                            Severity: Minor
                            Found in library/c/api.go - About 35 mins to fix

                              Function LightpushPublish has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              func LightpushPublish(instanceID uint, messageJSON string, topic string, peerID string, ms int) string {
                              Severity: Minor
                              Found in library/mobile/api_lightpush.go - About 35 mins to fix

                                Function NewWakuStore has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                func NewWakuStore(p MessageProvider, pm *peermanager.PeerManager, timesource timesource.Timesource, reg prometheus.Registerer, log *zap.Logger) *WakuStore {
                                Severity: Minor
                                Found in waku/v2/protocol/legacy_store/waku_store_common.go - About 35 mins to fix

                                  Method MessageSender.Send has 5 return statements (exceeds 4 allowed).
                                  Open

                                  func (ms *MessageSender) Send(req *Request) error {
                                      logger := ms.logger.With(
                                          zap.Stringer("envelopeHash", req.envelope.Hash()),
                                          zap.String("pubsubTopic", req.envelope.PubsubTopic()),
                                          zap.String("contentTopic", req.envelope.Message().ContentTopic),
                                  Severity: Major
                                  Found in waku/v2/api/publish/message_sender.go - About 35 mins to fix

                                    Function MakeHost has 5 return statements (exceeds 4 allowed).
                                    Open

                                    func MakeHost(ctx context.Context, port int, randomness io.Reader) (host.Host, error) {
                                        // Creates a new RSA key pair for this host.
                                        prvKey, _, err := crypto.GenerateKeyPairWithReader(crypto.RSA, 2048, randomness)
                                        if err != nil {
                                            log.Error(err.Error())
                                    Severity: Major
                                    Found in tests/utils.go - About 35 mins to fix

                                      Function RetrieveNodes has 5 return statements (exceeds 4 allowed).
                                      Open

                                      func RetrieveNodes(ctx context.Context, url string, opts ...DNSDiscoveryOption) ([]DiscoveredNode, error) {
                                          var discoveredNodes []DiscoveredNode
                                      
                                          params := new(dnsDiscoveryParameters)
                                          for _, opt := range opts {
                                      Severity: Major
                                      Found in waku/v2/dnsdisc/enr.go - About 35 mins to fix

                                        Method DB.Register has 5 return statements (exceeds 4 allowed).
                                        Open

                                        func (db *DB) Register(p peer.ID, ns string, signedPeerRecord []byte, ttl int) (uint64, error) {
                                            pid := p.String()
                                            expire := time.Now().Unix() + int64(ttl)
                                        
                                            tx, err := db.db.Begin()
                                        Severity: Major
                                        Found in waku/v2/rendezvous/db.go - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language