waku-org/go-waku

View on GitHub
library/encoding.go

Summary

Maintainability
A
3 hrs
Test Coverage

Function EncodeAsymmetric has 8 return statements (exceeds 4 allowed).
Open

func EncodeAsymmetric(messageJSON string, publicKey string, optionalSigningKey string) (string, error) {
    msg, err := wakuMessage(messageJSON)
    if err != nil {
        return "", err
    }
Severity: Major
Found in library/encoding.go - About 50 mins to fix

    Function DecodeAsymmetric has 7 return statements (exceeds 4 allowed).
    Open

    func DecodeAsymmetric(messageJSON string, privateKey string) (string, error) {
        var msg pb.WakuMessage
        err := json.Unmarshal([]byte(messageJSON), &msg)
        if err != nil {
            return "", err
    Severity: Major
    Found in library/encoding.go - About 45 mins to fix

      Function EncodeSymmetric has 7 return statements (exceeds 4 allowed).
      Open

      func EncodeSymmetric(messageJSON string, symmetricKey string, optionalSigningKey string) (string, error) {
          msg, err := wakuMessage(messageJSON)
          if err != nil {
              return "", err
          }
      Severity: Major
      Found in library/encoding.go - About 45 mins to fix

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

        func DecodeSymmetric(messageJSON string, symmetricKey string) (string, error) {
            var msg pb.WakuMessage
            err := json.Unmarshal([]byte(messageJSON), &msg)
            if err != nil {
                return "", err
        Severity: Major
        Found in library/encoding.go - About 40 mins to fix

          There are no issues that match your filters.

          Category
          Status