ali2210/WizDwarf

View on GitHub

Showing 82 of 170 total issues

Function profile has 75 lines of code (exceeds 50 allowed). Consider refactoring.
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: Minor
Found in main.go - About 2 hrs to fix

    Function existing has 73 lines of code (exceeds 50 allowed). Consider refactoring.
    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: Minor
    Found in main.go - About 1 hr to fix

      Function Genome_Extract has a Cognitive Complexity of 30 (exceeds 20 allowed). Consider refactoring.
      Open

      func Genome_Extract(m map[string]map[string]proteins.Aminochain, n map[string]string, key string) *binary.Micromolecule {
      
          // *************** declaration of props *************
          molecules := binary.Micromolecule{}
          var molecules_traits_a string = ""
      Severity: Minor
      Found in other/molecules/molecules.go - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function file_other_bucket_proto_bucket_proto_init has 72 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func file_other_bucket_proto_bucket_proto_init() {
          if File_other_bucket_proto_bucket_proto != nil {
              return
          }
          if !protoimpl.UnsafeEnabled {
      Severity: Minor
      Found in other/bucket/proto/bucket.pb.go - About 1 hr to fix

        Function existing has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring.
        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: Minor
        Found in main.go - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function visualize has 17 return statements (exceeds 4 allowed).
        Open

        func visualize(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 1 hr to fix

          Function file_other_genetic_binary_codebank_proto_init has 60 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func file_other_genetic_binary_codebank_proto_init() {
              if File_other_genetic_binary_codebank_proto != nil {
                  return
              }
              if !protoimpl.UnsafeEnabled {
          Severity: Minor
          Found in other/genetic/binary/codebank.pb.go - About 1 hr to fix

            Function file_other_proteins_binary_binary_proto_init has 59 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func file_other_proteins_binary_binary_proto_init() {
                if File_other_proteins_binary_binary_proto != nil {
                    return
                }
                if !protoimpl.UnsafeEnabled {
            Severity: Minor
            Found in other/proteins/binary/binary.pb.go - About 1 hr to fix

              Function profile has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring.
              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: Minor
              Found in main.go - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function update has 13 return statements (exceeds 4 allowed).
              Open

              func update(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 1 hr to fix

                Function newUser has a Cognitive Complexity of 26 (exceeds 20 allowed). Consider refactoring.
                Open

                func newUser(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: Minor
                Found in main.go - About 1 hr to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function analysis has 10 return statements (exceeds 4 allowed).
                Open

                func analysis(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 1 hr to fix

                  Function main has 10 return statements (exceeds 4 allowed).
                  Open

                  func main() {
                  
                      // Server
                  
                      host := os.Getenv("HOST")
                  Severity: Major
                  Found in main.go - About 1 hr to fix

                    Function Mounted has 10 return statements (exceeds 4 allowed).
                    Open

                    func Mounted(w http.ResponseWriter, r *http.Request) (string, error) {
                        r.ParseMultipartForm(10 << 50)
                    
                        var upldFile *os.File = nil
                        file, handler, err := r.FormFile("fileSeq")
                    Severity: Major
                    Found in piplines/dep_functions.go - About 1 hr to fix

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

                      func newUser(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 50 mins to fix

                        Method BucketObject.StoreObject has 8 return statements (exceeds 4 allowed).
                        Open

                        func (bo *BucketObject) StoreObject(user_phrase string, salt, filename, filetype string, passphrase ...string) *bucket.Bucket_Error {
                        
                            if reflect.DeepEqual(bo.NodeCredentials, &uplink.Access{}) {
                                return &bucket.Bucket_Error{Bucket: bucket.Bucket_Error_Category_Error}
                            }
                        Severity: Major
                        Found in other/bucket/storj_bucket/storj_bucket.go - About 50 mins to fix

                          Method FirestoreClient.SearchUser has 8 return statements (exceeds 4 allowed).
                          Open

                          func (fire *FirestoreClient) SearchUser(client *firestore.Client, member user.New_User) (*Doc_Response, error) {
                          
                              var profile_search map[string]interface{}
                          
                              ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
                          Severity: Major
                          Found in other/users/adduser.go - About 50 mins to fix

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

                            func dvault(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 50 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 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
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language