shuoyao/BirdGo

View on GitHub

Showing 169 of 169 total issues

Avoid deeply nested control flow statements.
Open

                                if ( xhr.readyState !== 4 ) {
                                    xhr.abort();
                                }

    Avoid deeply nested control flow statements.
    Open

                            if ( nid === expando ) {
                                context.removeAttribute( "id" );
                            }

      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 ( ( event.result = ret ) === false ) {
                                    event.preventDefault();
                                    event.stopPropagation();
                                }

          Avoid deeply nested control flow statements.
          Open

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

            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

              Avoid deeply nested control flow statements.
              Open

                                  if ( conv && s[ "throws" ] ) { // jscs:ignore requireDotNotation
                                      response = conv( response );
                                  } else {
                                      try {
                                          response = conv( response );

                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 ( ofType ?
                                                            node.nodeName.toLowerCase() === name :
                                                            node.nodeType === 1 ) {
                    
                                                            return false;

                      Avoid deeply nested control flow statements.
                      Open

                                          if ( name in thisCache ) {
                                              name = [ name ];
                                          } else {
                                              name = name.split( " " );
                                          }

                        Avoid deeply nested control flow statements.
                        Open

                                            if ( !selector ) {
                                                push.apply( results, seed );
                                                return results;
                                            }

                          Avoid deeply nested control flow statements.
                          Open

                                                  if ( matches[ sel ] ) {
                                                      matches.push( handleObj );
                                                  }

                            Avoid deeply nested control flow statements.
                            Open

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

                              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

                                                } else if ( copy !== undefined ) {
                                                    target[ name ] = copy;
                                                }

                                  Avoid deeply nested control flow statements.
                                  Open

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

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

                                        $document.on('ajax:send.rails', rails.formSubmitSelector, function(event) {
                                          if (this === event.target) rails.disableFormElements($(this));
                                        });
                                    public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 11555..11557

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

                                    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

                                        $document.on('ajax:complete.rails', rails.formSubmitSelector, function(event) {
                                          if (this === event.target) rails.enableFormElements($(this));
                                        });
                                    public/assets/application-b34af937661b1e622cea2d933ff65194efa8c7968c100e4a1364a2a317ea4460.js on lines 11551..11553

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

                                    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

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if ( delegateCount && cur.nodeType &&
                                                ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
                                    
                                                /* jshint eqeqeq: false */
                                                for ( ; cur != this; cur = cur.parentNode || this ) {
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language