waku-org/go-waku

View on GitHub

Showing 299 of 400 total issues

Function execute has 6 return statements (exceeds 4 allowed).
Open

func execute(ctx context.Context) error {
    rlnInstance, err := rln.NewRLN()
    if err != nil {
        return err
    }
Severity: Major
Found in cmd/waku/rlngenerate/command_rln.go - About 40 mins to fix

    Method WakuMetadata.Connected has 6 return statements (exceeds 4 allowed).
    Open

    func (wakuM *WakuMetadata) Connected(n network.Network, cc network.Conn) {
        go func() {
            defer utils.LogOnPanic()
            wakuM.log.Debug("peer connected", zap.Stringer("peer", cc.RemotePeer()))
            // Metadata verification is done only if a clusterID is specified
    Severity: Major
    Found in waku/v2/protocol/metadata/waku_metadata.go - About 40 mins to fix

      Method PeerManager.DiscoverAndConnectToPeers has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func (pm *PeerManager) DiscoverAndConnectToPeers(ctx context.Context, cluster uint16,
          shard uint16, serviceProtocol protocol.ID, maxCount int) error {
      Severity: Minor
      Found in waku/v2/peermanager/peer_discovery.go - About 35 mins to fix

        Method PeerManager.addPeer has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        func (pm *PeerManager) addPeer(ID peer.ID, addrs []ma.Multiaddr, origin wps.Origin, pubSubTopics []string, protocols ...protocol.ID) error {
        Severity: Minor
        Found in waku/v2/peermanager/peer_manager.go - About 35 mins to fix

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

          func createHostWithDiscv5AndPM(t *testing.T, hostName string, topic string, enrField uint8, bootnode ...*enode.Node) (host.Host, *PeerManager, *discv5.DiscoveryV5) {
          Severity: Minor
          Found in waku/v2/peermanager/peer_manager_test.go - About 35 mins to fix

            Method PeerManager.discoverOnDemand has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            func (pm *PeerManager) discoverOnDemand(cluster uint16,
                shard uint16, wakuProtocol protocol.ID, ctx context.Context, maxCount int) ([]service.PeerData, error) {
            Severity: Minor
            Found in waku/v2/peermanager/peer_discovery.go - About 35 mins to fix

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

              func WaitForTimeout(t *testing.T, ctx context.Context, timeout time.Duration, wg *sync.WaitGroup, ch chan *protocol.Envelope) {
              Severity: Minor
              Found in tests/utils.go - About 35 mins to fix

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

                func NewMissingMessageVerifier(storenodeRequester common.StorenodeRequestor, messageTracker MessageTracker, timesource timesource.Timesource, logger *zap.Logger, options ...MissingMessageVerifierOption) *MissingMessageVerifier {
                Severity: Minor
                Found in waku/v2/api/missing/missing_messages.go - About 35 mins to fix

                  Method defaultStorenodeMessageVerifier.MessageHashesExist has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  func (d *defaultStorenodeMessageVerifier) MessageHashesExist(ctx context.Context, requestID []byte, peerID peer.ID, pageSize uint64, messageHashes []pb.MessageHash) ([]pb.MessageHash, error) {
                  Severity: Minor
                  Found in waku/v2/api/publish/default_verifier.go - About 35 mins to fix

                    Method MissingMessageVerifier.fetchMessagesBatch has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    func (m *MissingMessageVerifier) fetchMessagesBatch(c chan<- *protocol.Envelope, interest criteriaInterest, batchFrom int, batchTo int, now time.Time) error {
                    Severity: Minor
                    Found in waku/v2/api/missing/missing_messages.go - About 35 mins to fix

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

                      func NewConnectionNotifier(ctx context.Context, h host.Host, connNotifCh chan<- PeerConnection, metrics Metrics, log *zap.Logger) ConnectionNotifier {
                      Severity: Minor
                      Found in waku/v2/node/connectedness.go - About 35 mins to fix

                        Method Rendezvous.DiscoverShard has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        func (r *Rendezvous) DiscoverShard(ctx context.Context, rp *RendezvousPoint, cluster uint16, shard uint16, numPeers int) {
                        Severity: Minor
                        Found in waku/v2/rendezvous/rendezvous.go - About 35 mins to fix

                          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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language