kalefranz/auxlib

View on GitHub

Showing 193 of 242 total issues

Function superMatcher has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        superMatcher = function( seed, context, xml, results, outermost ) {
            var elem, j, matcher,
                matchedCount = 0,
                i = "0",
                unmatched = seed && [],
Severity: Major
Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 hrs to fix

    Function send has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                    send: function( headers, complete ) {
                        var i,
                            xhr = options.xhr(),
                            id = ++xhrId;
    
    
    Severity: Major
    Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 hrs to fix

      Function domManip has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          domManip: function( args, callback ) {
      
              // Flatten any nested arrays
              args = concat.apply( [], args );
      
      
      Severity: Major
      Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 hrs to fix

        Function init has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            init = jQuery.fn.init = function( selector, context ) {
                var match, elem;
        
                // HANDLE: $(""), $(null), $(undefined), $(false)
                if ( !selector ) {
        Severity: Major
        Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 hrs to fix

          Function CHILD has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  "CHILD": function( type, what, argument, first, last ) {
                      var simple = type.slice( 0, 3 ) !== "nth",
                          forward = type.slice( -4 ) !== "last",
                          ofType = what === "of-type";
          
          
          Severity: Major
          Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 hrs to fix

            Function Deferred has 59 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Deferred: function( func ) {
                    var tuples = [
                            // action, add listener, listener list, final state
                            [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
                            [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
            Severity: Major
            Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 hrs to fix

              Consider simplifying this complex logical expression.
              Open

                                      if ( forward && useCache ) {
                                          // Seek `elem` from a previously-cached index
                                          outerCache = parent[ expando ] || (parent[ expando ] = {});
                                          cache = outerCache[ type ] || [];
                                          nodeIndex = cache[0] === dirruns && cache[1];
              Severity: Critical
              Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 hrs to fix

                Function ajaxConvert has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function ajaxConvert( s, response, jqXHR, isSuccess ) {
                    var conv2, current, conv, tmp, prev,
                        converters = {},
                        // Work with a copy of dataTypes in case we need to modify it for conversion
                        dataTypes = s.dataTypes.slice();
                Severity: Major
                Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 hrs to fix

                  Function eq has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function eq(a, b, stack) {
                      // Identical objects are equal. `0 === -0`, but they aren't identical.
                      // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
                      if (a === b) return a !== 0 || 1 / a == 1 / b;
                      // A strict comparison is necessary because `null == undefined`.
                  Severity: Major
                  Found in docs/_theme/basic/static/underscore-1.3.1.js - About 2 hrs to fix

                    Function memoizemethod has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def memoizemethod(method):
                        """
                        Decorator to cause a method to cache it's results in self for each
                        combination of inputs and return the cached result on subsequent calls.
                        Does not support named arguments or arg values that are not hashable.
                    Severity: Minor
                    Found in auxlib/decorators.py - About 2 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 remove has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        remove: function( elem, types, handler, selector, mappedTypes ) {
                            var j, handleObj, tmp,
                                origCount, t, events,
                                special, handlers, type,
                                namespaces, origType,
                    Severity: Major
                    Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 hrs to fix

                      Consider simplifying this complex logical expression.
                      Open

                                      if ( ( mappedTypes || origType === handleObj.origType ) &&
                                          ( !handler || handler.guid === handleObj.guid ) &&
                                          ( !tmp || tmp.test( handleObj.namespace ) ) &&
                                          ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
                                          handlers.splice( j, 1 );
                      Severity: Critical
                      Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 hrs to fix

                        Function internalRemoveData has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function internalRemoveData( elem, name, pvt ) {
                            if ( !jQuery.acceptData( elem ) ) {
                                return;
                            }
                        
                        
                        Severity: Minor
                        Found in docs/_theme/basic/static/jquery-1.11.1.js - About 1 hr to fix

                          Function initEvents has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function initEvents() {
                              $(document).on("click", 'a.comment-close', function(event) {
                                event.preventDefault();
                                hide($(this).attr('id').substring(2));
                              });
                          Severity: Minor
                          Found in docs/_theme/basic/static/websupport.js - About 1 hr to fix

                            Function box has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def box(self, instance, instance_type, val):
                                    if val is None:
                                        return None
                                    if isinstance(val, self._type):
                                        return val
                            Severity: Minor
                            Found in auxlib/entity.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 __init__ has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def __init__(self, **kwargs):
                                    for key, field in iteritems(self.__fields__):
                                        try:
                                            setattr(self, key, kwargs[key])
                                        except KeyError:
                            Severity: Minor
                            Found in auxlib/entity.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 deprecate_module_with_proxy has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def deprecate_module_with_proxy(module_name, module_dict, deprecated_attributes=None):
                                """
                                Usage:
                                    deprecate_module_with_proxy(__name__, locals())  # at bottom of module
                                """
                            Severity: Minor
                            Found in auxlib/deprecation.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 internalData has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function internalData( elem, name, data, pvt /* Internal Use Only */ ) {
                                if ( !jQuery.acceptData( elem ) ) {
                                    return;
                                }
                            
                            
                            Severity: Minor
                            Found in docs/_theme/basic/static/jquery-1.11.1.js - About 1 hr to fix

                              Function select has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              select = Sizzle.select = function( selector, context, results, seed ) {
                                  var i, tokens, token, type, find,
                                      compiled = typeof selector === "function" && selector,
                                      match = !seed && tokenize( (selector = compiled.selector || selector) );
                              
                              
                              Severity: Minor
                              Found in docs/_theme/basic/static/jquery-1.11.1.js - About 1 hr to fix

                                Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
                                    var matched, match, tokens, type,
                                        soFar, groups, preFilters,
                                        cached = tokenCache[ selector + " " ];
                                
                                
                                Severity: Minor
                                Found in docs/_theme/basic/static/jquery-1.11.1.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language