ali2210/WizDwarf

View on GitHub

Showing 170 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

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

              case 3: 
              
                    
                    document.getElementsByClassName('info-content-4')[0].children[0].innerHTML = filterObj[i].CDR_LINK;
                  
      Severity: Major
      Found in js/dvault.js and 3 other locations - About 3 days to fix
      js/dvault.js on lines 174..201
      js/dvault.js on lines 203..233
      js/dvault.js on lines 267..296

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 589.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

                case 1:
                  
                        document.getElementsByClassName('info-content-2')[0].children[0].innerHTML = filterObj[i].CDR_LINK;
                        document.getElementsByClassName('info-content-2')[0].children[1].innerHTML = filterObj[i].SizeOf;
                        document.getElementsByClassName('info-content-2')[0].children[2].innerHTML = filterObj[i].Access;
      Severity: Major
      Found in js/dvault.js and 3 other locations - About 3 days to fix
      js/dvault.js on lines 203..233
      js/dvault.js on lines 234..266
      js/dvault.js on lines 267..296

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 589.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

                case 2: 
              
        
                    document.getElementsByClassName('info-content-3')[0].children[0].innerHTML = filterObj[i].CDR_LINK;
                  
      Severity: Major
      Found in js/dvault.js and 3 other locations - About 3 days to fix
      js/dvault.js on lines 174..201
      js/dvault.js on lines 234..266
      js/dvault.js on lines 267..296

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 589.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 4 locations. Consider refactoring.
      Open

              case 4: 
                  
                    document.getElementsByClassName('info-content-5')[0].children[0].innerHTML = filterObj[i].CDR_LINK;
                  
                    document.getElementsByClassName('info-content-5')[0].children[1].innerHTML = filterObj[i].SizeOf;
      Severity: Major
      Found in js/dvault.js and 3 other locations - About 3 days to fix
      js/dvault.js on lines 174..201
      js/dvault.js on lines 203..233
      js/dvault.js on lines 234..266

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 589.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      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

        Similar blocks of code found in 4 locations. 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 and 3 other locations - About 2 days to fix
        other/proteins/proteins.go on lines 832..1094
        other/proteins/proteins.go on lines 1099..1361
        other/proteins/proteins.go on lines 1631..1893

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 1475.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. 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 and 3 other locations - About 2 days to fix
        other/proteins/proteins.go on lines 1099..1361
        other/proteins/proteins.go on lines 1631..1893
        other/proteins/proteins.go on lines 1898..2160

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 1475.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. 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 and 3 other locations - About 2 days to fix
        other/proteins/proteins.go on lines 832..1094
        other/proteins/proteins.go on lines 1631..1893
        other/proteins/proteins.go on lines 1898..2160

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 1475.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 4 locations. 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 and 3 other locations - About 2 days to fix
        other/proteins/proteins.go on lines 832..1094
        other/proteins/proteins.go on lines 1099..1361
        other/proteins/proteins.go on lines 1898..2160

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 1475.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        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

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            if !reflect.DeepEqual(update, &user.Updated_User{}) && updateInfo {
        
                meta, mapData, _ := piplines.GetDocuments([]string{update.ID}...)
                contKey, contVae := piplines.ReflectMaps(mapData)
        
        
        Severity: Major
        Found in main.go and 1 other location - About 1 day to fix
        main.go on lines 2139..2244

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 818.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            } else {
        
                meta, mapData, _ := piplines.GetDocuments([]string{data.ID}...)
                contKey, contVae := piplines.ReflectMaps(mapData)
        
        
        Severity: Major
        Found in main.go and 1 other location - About 1 day to fix
        main.go on lines 2036..2139

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 818.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        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

                Severity
                Category
                Status
                Source
                Language