kalefranz/auxlib

View on GitHub

Showing 242 of 242 total issues

File jquery-1.11.1.js has 6829 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v1.11.1
 * http://jquery.com/
 *
 * Includes Sizzle.js
Severity: Major
Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 wks to fix

    Function Sizzle has 1347 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    (function( window ) {
    
    var i,
        support,
        Expr,
    Severity: Major
    Found in docs/_theme/basic/static/jquery-1.11.1.js - About 6 days to fix

      File entity.py has 733 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # -*- coding: utf-8 -*-
      """
      This module provides serializable, validatable, type-enforcing domain objects and data
      transfer objects. It has many of the same motivations as the python
      `Marshmallow <http://marshmallow.readthedocs.org/en/latest/why.html>`_ package. It is most
      Severity: Major
      Found in auxlib/entity.py - About 1 day to fix

        File underscore-1.3.1.js has 665 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        //     Underscore.js 1.3.1
        //     (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
        //     Underscore is freely distributable under the MIT license.
        //     Portions of Underscore are inspired or borrowed from Prototype,
        //     Oliver Steele's Functional, and John Resig's Micro-Templating.
        Severity: Major
        Found in docs/_theme/basic/static/underscore-1.3.1.js - About 1 day to fix

          File websupport.js has 638 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*
           * websupport.js
           * ~~~~~~~~~~~~~
           *
           * sphinx.websupport utilties for all documentation.
          Severity: Major
          Found in docs/_theme/basic/static/websupport.js - About 1 day to fix

            Function ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                ajax: function( url, options ) {
            
                    // If url is an object, simulate pre-1.5 signature
                    if ( typeof url === "object" ) {
                        options = url;
            Severity: Major
            Found in docs/_theme/basic/static/jquery-1.11.1.js - About 1 day to fix

              Function setDocument has 216 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              setDocument = Sizzle.setDocument = function( node ) {
                  var hasCompare,
                      doc = node ? node.ownerDocument || node : preferredDoc,
                      parent = doc.defaultView;
              
              
              Severity: Major
              Found in docs/_theme/basic/static/jquery-1.11.1.js - About 1 day to fix

                Function Callbacks has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                jQuery.Callbacks = function( options ) {
                
                    // Convert options from String-formatted to Object-formatted if needed
                    // (we check in cache first)
                    options = typeof options === "string" ?
                Severity: Major
                Found in docs/_theme/basic/static/jquery-1.11.1.js - About 5 hrs to fix

                  Consider simplifying this complex logical expression.
                  Open

                              if ( event.pageX == null && original.clientX != null ) {
                                  eventDoc = event.target.ownerDocument || document;
                                  doc = eventDoc.documentElement;
                                  body = eventDoc.body;
                  
                  
                  Severity: Critical
                  Found in docs/_theme/basic/static/jquery-1.11.1.js - About 5 hrs to fix

                    Function defaultPrefilter has 105 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function defaultPrefilter( elem, props, opts ) {
                        /* jshint validthis: true */
                        var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
                            anim = this,
                            orig = {},
                    Severity: Major
                    Found in docs/_theme/basic/static/jquery-1.11.1.js - About 4 hrs to fix

                      Function stringify has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def stringify(obj, content_max_len=0):
                          def bottle_builder(builder, bottle_object):
                              builder.append("{0} {1}{2} {3}".format(bottle_object.method,
                                                                     bottle_object.path,
                                                                     bottle_object.environ.get('QUERY_STRING', ''),
                      Severity: Minor
                      Found in auxlib/logz.py - About 4 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

                      Cyclomatic complexity is too high in function typify. (17)
                      Open

                      def typify(value, type_hint=None):
                          """Take a primitive value, usually a string, and try to make a more relevant type out of it.
                          An optional type_hint will try to coerce the value to that type.
                      
                          Args:
                      Severity: Minor
                      Found in auxlib/type_coercion.py by radon

                      Cyclomatic Complexity

                      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

                      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

                      Construct Effect on CC Reasoning
                      if +1 An if statement is a single decision.
                      elif +1 The elif statement adds another decision.
                      else +0 The else statement does not cause a new decision. The decision is at the if.
                      for +1 There is a decision at the start of the loop.
                      while +1 There is a decision at the while statement.
                      except +1 Each except branch adds a new conditional path of execution.
                      finally +0 The finally block is unconditionally executed.
                      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
                      assert +1 The assert statement internally roughly equals a conditional statement.
                      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
                      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

                      Source: http://radon.readthedocs.org/en/latest/intro.html

                      Function typify has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def typify(value, type_hint=None):
                          """Take a primitive value, usually a string, and try to make a more relevant type out of it.
                          An optional type_hint will try to coerce the value to that type.
                      
                          Args:
                      Severity: Minor
                      Found in auxlib/type_coercion.py - About 3 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 trigger has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          trigger: function( event, data, elem, onlyHandlers ) {
                              var handle, ontype, cur,
                                  bubbleType, special, tmp, i,
                                  eventPath = [ elem || document ],
                                  type = hasOwn.call( event, "type" ) ? event.type : event,
                      Severity: Major
                      Found in docs/_theme/basic/static/jquery-1.11.1.js - About 3 hrs to fix

                        Function Animation has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function Animation( elem, properties, options ) {
                            var result,
                                stopped,
                                index = 0,
                                length = animationPrefilters.length,
                        Severity: Major
                        Found in docs/_theme/basic/static/jquery-1.11.1.js - About 3 hrs to fix

                          Function Sizzle has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function Sizzle( selector, context, results, seed ) {
                              var match, elem, m, nodeType,
                                  // QSA vars
                                  i, groups, old, nid, newContext, newSelector;
                          
                          
                          Severity: Major
                          Found in docs/_theme/basic/static/jquery-1.11.1.js - About 3 hrs to fix

                            Cyclomatic complexity is too high in method __init__. (13)
                            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 by radon

                            Cyclomatic Complexity

                            Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

                            Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

                            Construct Effect on CC Reasoning
                            if +1 An if statement is a single decision.
                            elif +1 The elif statement adds another decision.
                            else +0 The else statement does not cause a new decision. The decision is at the if.
                            for +1 There is a decision at the start of the loop.
                            while +1 There is a decision at the while statement.
                            except +1 Each except branch adds a new conditional path of execution.
                            finally +0 The finally block is unconditionally executed.
                            with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
                            assert +1 The assert statement internally roughly equals a conditional statement.
                            Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
                            Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

                            Source: http://radon.readthedocs.org/en/latest/intro.html

                            Function buildFragment has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                buildFragment: function( elems, context, scripts, selection ) {
                                    var j, elem, contains,
                                        tmp, tag, tbody, wrap,
                                        l = elems.length,
                            
                            
                            Severity: Major
                            Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 hrs to fix

                              Function add has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  add: function( elem, types, handler, data, selector ) {
                                      var tmp, events, t, handleObjIn,
                                          special, eventHandle, handleObj,
                                          handlers, type, namespaces, origType,
                                          elemData = jQuery._data( elem );
                              Severity: Major
                              Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 hrs to fix

                                Function matcherFromGroupMatchers has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
                                    var bySet = setMatchers.length > 0,
                                        byElement = elementMatchers.length > 0,
                                        superMatcher = function( seed, context, xml, results, outermost ) {
                                            var elem, j, matcher,
                                Severity: Major
                                Found in docs/_theme/basic/static/jquery-1.11.1.js - About 2 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language