ali2210/WizDwarf

View on GitHub

Showing 82 of 170 total issues

File proteins.go has 2490 lines of code (exceeds 500 allowed). Consider refactoring.
Open

/* This codebase desgin according to mozilla open source license.
Redistribution , contribution and improve codebase under license
convensions. @contact Ali Hassan AliMatrixCode@protonmail.com */

package proteins
Severity: Major
Found in other/proteins/proteins.go - About 6 days to fix

    File main.go has 2005 lines of code (exceeds 500 allowed). Consider refactoring.
    Open

    /* This codebase desgin according to mozilla open source license.
    Redistribution , contribution and improve codebase under license
    convensions. @contact Ali Hassan AliMatrixCode@protonmail.com */
    
    // package
    Severity: Major
    Found in main.go - About 4 days to fix

      Function GetAmino has 696 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func GetAmino(s string, i, j int) Aminochain {
          switch s[i:j] {
          case "TTT":
              aminochain.Symbol = "F"
              aminochain.Mass = 165.192
      Severity: Major
      Found in other/proteins/proteins.go - About 3 days to fix

        Function view has a Cognitive Complexity of 105 (exceeds 20 allowed). Consider refactoring.
        Open

        func view(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 day 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

        File dep_functions.go has 868 lines of code (exceeds 500 allowed). Consider refactoring.
        Open

        /* This codebase desgin according to mozilla open source license.
        Redistribution , contribution and improve codebase under license
        convensions. @contact Ali Hassan AliMatrixCode@protonmail.com */
        
        // Package or module
        Severity: Major
        Found in piplines/dep_functions.go - About 1 day to fix

          Function dashboard has a Cognitive Complexity of 78 (exceeds 20 allowed). Consider refactoring.
          Open

          func dashboard(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 day 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 GetPKa has 251 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func GetPKa(str string, i, j int) (string, string, string) {
              switch str[i:j] {
              case "TTT":
                  aminochain.Symbol = "F"
                  aminochain.Acidity_a = "1.83"
          Severity: Major
          Found in other/proteins/proteins.go - About 1 day to fix

            Function dashboard has 221 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func dashboard(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 7 hrs to fix

              Function view has 199 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func view(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 6 hrs to fix

                Function update has a Cognitive Complexity of 60 (exceeds 20 allowed). Consider refactoring.
                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: Minor
                Found in main.go - About 6 hrs 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 GetSulphur has 197 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

                func GetSulphur(s string, i, j int) (int64, string) {
                    switch s[i:j] {
                    case "TTT":
                        aminochain.Symbol = "F"
                        aminochain.Sulphur = 0
                Severity: Major
                Found in other/proteins/proteins.go - About 6 hrs to fix

                  Function GetHydrogen has 197 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

                  func GetHydrogen(str string, i, j int) (int64, string) {
                      switch str[i:j] {
                      case "TTT":
                          aminochain.Symbol = "F"
                          aminochain.Hydrogen = 11
                  Severity: Major
                  Found in other/proteins/proteins.go - About 6 hrs to fix

                    Function GetCarbon has 197 lines of code (exceeds 50 allowed). Consider refactoring.
                    Open

                    func GetCarbon(s string, i, j int) (int64, string) {
                        switch s[i:j] {
                        case "TTT":
                            aminochain.Symbol = "F"
                            aminochain.Carbon = 9
                    Severity: Major
                    Found in other/proteins/proteins.go - About 6 hrs to fix

                      Function GetNitrogen has 197 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func GetNitrogen(s string, i, j int) (int64, string) {
                          switch s[i:j] {
                          case "TTT":
                              aminochain.Symbol = "F"
                              aminochain.Nitrogen = 1
                      Severity: Major
                      Found in other/proteins/proteins.go - About 6 hrs to fix

                        Function GetOxgygen has 195 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func GetOxgygen(s string, i, j int) (int64, string) {
                            switch s[i:j] {
                            case "TTT":
                                aminochain.Symbol = "F"
                                aminochain.Oxygen = 2
                        Severity: Major
                        Found in other/proteins/proteins.go - About 6 hrs to fix

                          Function GetMagnetism has 195 lines of code (exceeds 50 allowed). Consider refactoring.
                          Open

                          func GetMagnetism(s string, i, j int) (string, string) {
                              switch s[i:j] {
                              case "TTT":
                                  aminochain.Symbol = "F"
                                  aminochain.Magnetic = "0.0"
                          Severity: Major
                          Found in other/proteins/proteins.go - About 6 hrs to fix

                            Function main has 193 lines of code (exceeds 50 allowed). Consider refactoring.
                            Open

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

                              Function GetMolarMass has 191 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

                              func GetMolarMass(s string, i, j int) (float64, string) {
                                  switch s[i:j] {
                                  case "TTT":
                                      aminochain.Symbol = "F"
                                      aminochain.Mass = 165.192
                              Severity: Major
                              Found in other/proteins/proteins.go - About 6 hrs to fix

                                Function visualize has 189 lines of code (exceeds 50 allowed). Consider refactoring.
                                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 6 hrs to fix

                                  Function AvatarUpload has 179 lines of code (exceeds 50 allowed). Consider refactoring.
                                  Open

                                  func AvatarUpload(r *http.Request, user_id string) (string, error) {
                                  
                                      //  Set the buffer size for the picture file contents
                                      r.ParseMultipartForm(10 << 50)
                                  
                                  
                                  Severity: Major
                                  Found in piplines/dep_functions.go - About 6 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language