angelakuo/citydogshare

View on GitHub

Showing 3,976 of 3,976 total issues

Avoid deeply nested control flow statements.
Open

                    if ( (nid = context.getAttribute( "id" )) ) {
                        nid = nid.replace( rescape, "\\$&" );
                    } else {
                        context.setAttribute( "id", (nid = expando) );
                    }

    Avoid deeply nested control flow statements.
    Open

                            if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
                                cur += clazz + " ";
                            }

      Avoid deeply nested control flow statements.
      Open

                    if (down) {
                      compare = compareDown;
                      declare = declareDown;
                    }

        Avoid deeply nested control flow statements.
        Open

                    if (!hasProp.call(ref2, k)) continue;

          Function setMatcher has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {

            Avoid deeply nested control flow statements.
            Open

                                        if ( !(unmatched[i] || setMatched[i]) ) {
                                            setMatched[i] = pop.call( results );
                                        }

              Avoid deeply nested control flow statements.
              Open

                                      if ( attrs[ i ] ) {
                                          name = attrs[ i ].name;
                                          if ( name.indexOf( "data-" ) === 0 ) {
                                              name = jQuery.camelCase( name.slice( 5 ) );
                                              dataAttr( elem, name, data[ name ] );

                Avoid deeply nested control flow statements.
                Open

                                    if ( nodeType === 9 ) {
                                        if ( (elem = context.getElementById( m )) ) {
                
                                            // Support: IE, Opera, Webkit
                                            // TODO: identify versions

                  Avoid deeply nested control flow statements.
                  Open

                                      while ( i-- ) {
                                          groups[i] = nidselect + " " + toSelector( groups[i] );
                                      }

                    Avoid deeply nested control flow statements.
                    Open

                                        if ( rscriptType.test( node.type || "" ) &&
                                            !jQuery._data( node, "globalEval" ) &&
                                            jQuery.contains( doc, node ) ) {
                    
                                            if ( node.src ) {

                      Avoid deeply nested control flow statements.
                      Open

                                          for ( conv2 in converters ) {
                      
                                              // If conv2 outputs current
                                              tmp = conv2.split( " " );
                                              if ( tmp[ 1 ] === current ) {

                        Avoid deeply nested control flow statements.
                        Open

                                                        if ( typeof xhr.responseText === "string" ) {
                                                            responses.text = xhr.responseText;
                                                        }

                          Avoid deeply nested control flow statements.
                          Open

                                                  if ( !attributes && typeof elem.removeAttribute !== "undefined" ) {
                                                      elem.removeAttribute( internalKey );
                          
                                                  // Webkit & Blink performance suffers when deleting properties
                                                  // from DOM nodes, so set to undefined instead

                            Function on has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            function on( elem, types, selector, data, fn, one ) {

                              Avoid deeply nested control flow statements.
                              Open

                                                      if ( (elem = matcherOut[i]) ) {
                                                          // Restore matcherIn since elem is not yet a final match
                                                          temp.push( (matcherIn[i] = elem) );
                                                      }

                                Avoid deeply nested control flow statements.
                                Open

                                                        if ( elem.id !== match[ 2 ] ) {
                                                            return rootjQuery.find( selector );
                                                        }

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          if ( ( event.result = ret ) === false ) {
                                                              event.preventDefault();
                                                              event.stopPropagation();
                                                          }

                                    Avoid deeply nested control flow statements.
                                    Open

                                                if (rest === 1) {
                                                  expandedIdx = vvarText + ".length - 1";
                                                } else {
                                                  ivar = o.scope.freeVariable('i', {
                                                    single: true

                                      Function Order has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      getJasmineRequireObj().Order = function() {
                                        function Order(options) {
                                          this.random = 'random' in options ? options.random : true;
                                          var seed = this.seed = options.seed || generateSeed();
                                          this.sort = this.random ? randomOrder : naturalOrder;

                                      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 scheduleFunction has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          self.scheduleFunction = function(funcToCall, millis, params, recurring, timeoutKey, runAtMillis) {
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language