engineyard/todo

View on GitHub

Showing 145 of 145 total issues

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

        submit: function( elem ) {
            var name = elem.nodeName.toLowerCase();
            return (name === "input" || name === "button") && "submit" === elem.type;
        },
Severity: Major
Found in public/javascripts/jquery.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.js on lines 4355..4358

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

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 ( jQuery.isFunction( html ) ) {
            return this.each(function(i) {
                jQuery(this).wrapAll( html.call(this, i) );
            });
        }
Severity: Major
Found in public/javascripts/jquery.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.js on lines 5533..5537

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

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 ( jQuery.isFunction( html ) ) {
            return this.each(function(i) {
                jQuery(this).wrapInner( html.call(this, i) );
            });
        }
Severity: Major
Found in public/javascripts/jquery.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.js on lines 5504..5508

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

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

        reset: function( elem ) {
            var name = elem.nodeName.toLowerCase();
            return (name === "input" || name === "button") && "reset" === elem.type;
        },
Severity: Major
Found in public/javascripts/jquery.js and 1 other location - About 1 hr to fix
public/javascripts/jquery.js on lines 4346..4349

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

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

Sizzle.find = function( expr, context, isXML ) {
    var set;

    if ( !expr ) {
        return [];
Severity: Minor
Found in public/javascripts/jquery.js - About 1 hr to fix

    Function > has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            ">": function( checkSet, part ) {
                var elem,
                    isPartStr = typeof part === "string",
                    i = 0,
                    l = checkSet.length;
    Severity: Minor
    Found in public/javascripts/jquery.js - About 1 hr to fix

      Function toggleClass has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          toggleClass: function( value, stateVal ) {
              var type = typeof value,
                  isBool = typeof stateVal === "boolean";
      
              if ( jQuery.isFunction( value ) ) {
      Severity: Minor
      Found in public/javascripts/jquery.js - About 1 hr to fix

        Function cloneFixAttributes has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function cloneFixAttributes( src, dest ) {
            var nodeName;
        
            // We do not need to do anything for non-Elements
            if ( dest.nodeType !== 1 ) {
        Severity: Minor
        Found in public/javascripts/jquery.js - About 1 hr to fix

          Function handle has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              handle: function( event ) {
                  event = jQuery.event.fix( event || window.event );
                  // Snapshot the handlers list since a called handler may add/remove events.
                  var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0),
                      run_all = !event.exclusive && !event.namespace,
          Severity: Minor
          Found in public/javascripts/jquery.js - About 1 hr to fix

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

              $(rails.formSubmitSelector).live('ajax:beforeSend.rails', function(event) {
                if (this == event.target) rails.disableFormElements($(this));
              });
            Severity: Minor
            Found in public/javascripts/jquery_ujs.js and 1 other location - About 55 mins to fix
            public/javascripts/jquery_ujs.js on lines 311..313

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

            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

              $(rails.formSubmitSelector).live('ajax:complete.rails', function(event) {
                if (this == event.target) rails.enableFormElements($(this));
              });
            Severity: Minor
            Found in public/javascripts/jquery_ujs.js and 1 other location - About 55 mins to fix
            public/javascripts/jquery_ujs.js on lines 307..309

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

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

                    ATTR: function( match, curLoop, inplace, result, not, isXML ) {
            Severity: Minor
            Found in public/javascripts/jquery.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if ( !old ) {
                                      context.setAttribute( "id", nid );
                                  } else {
                                      nid = nid.replace( /'/g, "\\$&" );
                                  }
              Severity: Major
              Found in public/javascripts/jquery.js - About 45 mins to fix

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

                    access: function( elems, key, value, exec, fn, pass ) {
                Severity: Minor
                Found in public/javascripts/jquery.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if ( jQuery.isPlainObject( context ) ) {
                                              selector = [ document.createElement( ret[1] ) ];
                                              jQuery.fn.attr.call( selector, context, true );
                  
                                          } else {
                  Severity: Major
                  Found in public/javascripts/jquery.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
                                                if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
                                                    setClass += " " + classNames[c];
                                                }
                                            }
                    Severity: Major
                    Found in public/javascripts/jquery.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
                                                  className = className.replace(" " + classNames[c] + " ", " ");
                                              }
                      Severity: Major
                      Found in public/javascripts/jquery.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ( pos == null ) {
                                                    eventType.splice( j--, 1 );
                                                }
                        Severity: Major
                        Found in public/javascripts/jquery.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                      if ( !xhrCallbacks ) {
                                                          xhrCallbacks = {};
                                                          jQuery( window ).unload( xhrOnUnloadAbort );
                                                      }
                          Severity: Major
                          Found in public/javascripts/jquery.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                        if ( display === "inline" ) {
                                                            this.style.display = "inline-block";
                            
                                                        } else {
                                                            this.style.display = "inline";
                            Severity: Major
                            Found in public/javascripts/jquery.js - About 45 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language