ali2210/WizDwarf

View on GitHub

Showing 82 of 170 total issues

Avoid deeply nested control flow statements.
Open

        } else if strings.Contains(r.FormValue("status"), "maried") {
            updated_info.Status = user.Relationship_Maried
        } else if strings.Contains(r.FormValue("status"), "Widow") {
            updated_info.Status = user.Relationship_Widow
        } else if strings.Contains(r.FormValue("status"), "widow") {
Severity: Major
Found in main.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

                      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

            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

                      } 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

                      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

                        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

                                Method Gallery_Stream_Server.SearchPictures has 5 return statements (exceeds 4 allowed).
                                Open

                                func (c *Gallery_Stream_Server) SearchPictures(ctx context.Context, compress *Compressed) *ContentRoute {
                                
                                    // if no data will provided by the client then throw error
                                    if reflect.DeepEqual(compress, &Compressed{}) {
                                        return &ContentRoute{UserAgentId: "", IsP2PAddress: false}
                                Severity: Major
                                Found in other/collection/gallery_service.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

                                      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

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

                                        func AddNewProfile(response http.ResponseWriter, request *http.Request, add user.New_User) (*firestore.DocumentRef, bool, error) {
                                        
                                            // var member user.New_User
                                            var document *firestore.DocumentRef
                                            var err error
                                        Severity: Major
                                        Found in piplines/dep_functions.go - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language