ali2210/WizDwarf

View on GitHub

Showing 82 of 170 total issues

Avoid deeply nested control flow statements.
Open

                if err != nil {
                    return
                }
Severity: Major
Found in main.go - About 45 mins to fix

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

    func existing(w http.ResponseWriter, r *http.Request) {
    
        // user request headers
        w.Header().Set("Access-Control-Allow-Origin", "*")
        w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
    Severity: Major
    Found in main.go - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                      if err != nil {
                          return
                      }
      Severity: Major
      Found in main.go - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if err != nil {
                                return
                            }
        Severity: Major
        Found in main.go - About 45 mins to fix

          Method GBucket.New_Bucket has 7 return statements (exceeds 4 allowed).
          Open

          func (c *GBucket) New_Bucket(o *proto.Object) *proto.IObject {
          
              // ensure data validation
              if strings.Contains(o.Name, " ") {
                  return &proto.IObject{Iobject: &proto.Object{}, Istatus: proto.Object_Status_ERROR}
          Severity: Major
          Found in other/bucket/wbucket.go - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                } else if strings.Contains(s, ".tif") {
                    tags = strings.Split(s, ".tif")
                } else {
                    tags = append(tags, " ")
                }
            Severity: Major
            Found in other/parser/parser.go - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                      } else if strings.Contains(r.FormValue("sufix"), "mrs") {
                          updated_info.Suffix = user.Respecful_Mrs
                          updated_info.Gender = user.Traits_WOMEN
                      } else if strings.Contains(r.FormValue("sufix"), "Ms") {
                          updated_info.Suffix = user.Respecful_Ms
              Severity: Major
              Found in main.go - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                if err != nil {
                                    return
                                }
                Severity: Major
                Found in main.go - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                  if err != nil {
                                      return
                                  }
                  Severity: Major
                  Found in main.go - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                    if err != nil {
                                        return
                                    }
                    Severity: Major
                    Found in main.go - About 45 mins to fix

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

                      func ProteinsCryptoSignature(value int64) (*DocumentCredentials, int64, error) {
                      
                          content, err := GetQProteins(value)
                          if err != nil {
                              log.Fatalln("Error:", error_codes.Operation_ERROR_CODE_UNEXPECTED_STATE)
                      Severity: Major
                      Found in piplines/dep_functions.go - About 45 mins to fix

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

                        func profile(w http.ResponseWriter, r *http.Request) {
                        
                            w.Header().Set("Access-Control-Allow-Origin", "*")
                            w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE")
                            w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length")
                        Severity: Major
                        Found in main.go - About 40 mins to fix

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

                          func TrustRequest(message, verifier, request string) (bool, *ed25519.PrivateKey, error) {
                          
                              // contain check whether request have pass-key ,
                              // address contain address of trusted user wallet
                              //  & message must not be empty
                          Severity: Major
                          Found in piplines/dep_functions.go - About 40 mins to fix

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

                            func Data_Predicition(w http.ResponseWriter, r *http.Request, fname, choose string, file *os.File, algo info.Levenshtein) error {
                            Severity: Minor
                            Found in piplines/dep_functions.go - About 35 mins to fix

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

                              func CreateFile(filename ...string) (*os.File, error) {
                              
                                  if _, err := os.Stat(filename[0]); os.IsExist(err) {
                                      return &os.File{}, err
                                  }
                              Severity: Major
                              Found in other/parser/parser.go - About 35 mins to fix

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

                                func Metadata(filename, key, ownership string, client *firestore.Client) int {
                                
                                    if reflect.DeepEqual(ownership, "") {
                                
                                        log.Fatalln("Empty ownership:", ownership)
                                Severity: Major
                                Found in other/parser/parse_image/parse_image.go - About 35 mins to fix

                                  Method BucketObject.StoreJCredentials has 5 return statements (exceeds 4 allowed).
                                  Open

                                  func (boj *BucketObject) StoreJCredentials(user_phrase string, passphrase ...string) (*bucket.Bucket_Error, *uplink.Access) {
                                  
                                      const api_key string = "1dfJiTZDDGnTZ9gCmZDAFDp1gLCBSsijs838VhzgskptVYifaWwwDwE51cAqTwATc1L7wwfaQ8Jz723JMLjEvFntG6ZccHwgm7GpvaqCABtFMh4rtU2K"
                                      const address string = "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs@eu1.storj.io:7777"
                                  
                                  
                                  Severity: Major
                                  Found in other/bucket/storj_bucket/storj_bucket.go - About 35 mins to fix

                                    Method BucketObject.DownloadObject has 5 return statements (exceeds 4 allowed).
                                    Open

                                    func (boj *BucketObject) DownloadObject(project *uplink.Project) *bucket.Bucket_Error {
                                    
                                        downObj, err := project.StatObject(boj.Ctx, boj.Bucket, boj.Key)
                                        if err != nil {
                                    
                                    
                                    Severity: Major
                                    Found in other/bucket/storj_bucket/storj_bucket.go - About 35 mins to fix

                                      Method DLINK_Object.Preview_Get has 5 return statements (exceeds 4 allowed).
                                      Open

                                      func (o *DLINK_Object) Preview_Get(filename string, link ...string) (dlink.PreviewLink, dlink.Errors) {
                                      
                                          if errs := o.Get(filename, link...); errs != dlink.Errors_NONE {
                                              return dlink.PreviewLink{}, errs
                                          }
                                      Severity: Major
                                      Found in other/cloudmedia/dlink.go - About 35 mins to fix

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

                                        func FilePrints(prints ...string) (map[string]string, linkcid.Cid) {
                                        
                                            nullify := map[string]string{}
                                            hash_data := sha256.Sum256([]byte(prints[0]))
                                        
                                        
                                        Severity: Major
                                        Found in other/crypto/crypto.go - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language