justaddcoffee/kg-emerging-viruses

View on GitHub

Showing 237 of 237 total issues

Function handler has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        handler: function( event ) {
            var notAsync, result,
                saved = dataPriv.get( this, type );

            if ( ( event.isTrigger & 1 ) && this[ type ] ) {
Severity: Minor
Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

    Function load has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    jQuery.fn.load = function( url, params, callback ) {
        var selector, type, response,
            self = this,
            off = url.indexOf( " " );
    
    
    Severity: Minor
    Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

      Function speed has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      jQuery.speed = function( speed, easing, fn ) {
          var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
              complete: fn || !fn && easing ||
                  isFunction( speed ) && speed,
              duration: speed,
      Severity: Minor
      Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

        Function set has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                set: function( elem, value, extra ) {
                    var matches,
                        styles = getStyles( elem ),
        
                        // Only read styles.position if the test has a chance to fail
        Severity: Minor
        Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

          Function removeClass has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              removeClass: function( value ) {
                  var classes, elem, cur, curValue, clazz, j, finalValue,
                      i = 0;
          
                  if ( isFunction( value ) ) {
          Severity: Minor
          Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

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

                preventDefault: function() {
                    var e = this.originalEvent;
            
                    this.isDefaultPrevented = returnTrue;
            
            
            Severity: Major
            Found in docs/_static/jquery-3.5.1.js and 1 other location - About 1 hr to fix
            docs/_static/jquery-3.5.1.js on lines 5770..5778

            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 59.

            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

                stopPropagation: function() {
                    var e = this.originalEvent;
            
                    this.isPropagationStopped = returnTrue;
            
            
            Severity: Major
            Found in docs/_static/jquery-3.5.1.js and 1 other location - About 1 hr to fix
            docs/_static/jquery-3.5.1.js on lines 5761..5769

            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 59.

            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 attr has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                attr: function( elem, name, value ) {
                    var ret, hooks,
                        nType = elem.nodeType;
            
                    // Don't get/set attributes on text, comment and attribute nodes
            Severity: Minor
            Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

              Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  finish: function( type ) {
                      if ( type !== false ) {
                          type = type || "fx";
                      }
                      return this.each( function() {
              Severity: Minor
              Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

                Function off has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    off: function( types, selector, fn ) {
                        var handleObj, type;
                        if ( types && types.preventDefault && types.handleObj ) {
                
                            // ( event )  dispatched jQuery.Event
                Severity: Minor
                Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

                  Function parseHTML has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  jQuery.parseHTML = function( data, context, keepScripts ) {
                      if ( typeof data !== "string" ) {
                          return [];
                      }
                      if ( typeof context === "boolean" ) {
                  Severity: Minor
                  Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

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

                            if ( isFunction( value ) ) {
                                return this.each( function( j ) {
                                    jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
                                } );
                            }
                    Severity: Major
                    Found in docs/_static/jquery-3.5.1.js and 1 other location - About 1 hr to fix
                    docs/_static/jquery-3.5.1.js on lines 8273..8277

                    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 57.

                    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

                            if ( isFunction( value ) ) {
                                return this.each( function( j ) {
                                    jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
                                } );
                            }
                    Severity: Major
                    Found in docs/_static/jquery-3.5.1.js and 1 other location - About 1 hr to fix
                    docs/_static/jquery-3.5.1.js on lines 8310..8314

                    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 57.

                    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 load_mapping has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def load_mapping(
                            self, input_dir: str, output_dir: str, species_id: Optional[List] = None
                        ) -> None:
                            """Load Ensembl Gene to Protein mapping from NCBI gene2ensembl (gene2ensembl.gz).
                    
                    
                    Severity: Minor
                    Found in kg_covid_19/transform_utils/string_ppi/string_ppi.py - 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 parse_ttd_file has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def parse_ttd_file(self, file: str) -> dict:
                            """Parse entire TTD download file.
                    
                            (a few megs, not very mem efficient, but
                            should be okay), and return a dict of dicts of lists
                    Severity: Minor
                    Found in kg_covid_19/transform_utils/ttd/ttd.py - 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 interactor_to_node has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def interactor_to_node(self, interactor: minidom.Element) -> List[Union[int, list]]:
                            """Parse an interactor as a list of nodes."""
                            interactor_id = interactor.attributes["id"].value
                    
                            this_id = ""
                    Severity: Minor
                    Found in kg_covid_19/transform_utils/intact/intact.py - 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 when has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        when: function( singleValue ) {
                            var
                    
                                // count of uncompleted subordinates
                                remaining = arguments.length,
                    Severity: Minor
                    Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

                      Function addClass has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          addClass: function( value ) {
                              var classes, elem, cur, curValue, clazz, j, finalValue,
                                  i = 0;
                      
                              if ( isFunction( value ) ) {
                      Severity: Minor
                      Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

                        Function position has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            position: function() {
                                if ( !this[ 0 ] ) {
                                    return;
                                }
                        
                        
                        Severity: Minor
                        Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

                          Function clone has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                                  var i, l, srcElements, destElements,
                                      clone = elem.cloneNode( true ),
                                      inPage = isAttached( elem );
                          
                          
                          Severity: Minor
                          Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language