arey/angular-musicbrainz

View on GitHub
app/lib/jquery/jquery-migrate.js

Summary

Maintainability
C
1 day
Test Coverage

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

/*!
 * jQuery Migrate - v1.2.1 - 2013-05-08
 * https://github.com/jquery/jquery-migrate
 * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
 */
Severity: Minor
Found in app/lib/jquery/jquery-migrate.js - About 5 hrs to fix

    Function attr has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    jQuery.attr = function( elem, name, value, pass ) {
        var lowerName = name.toLowerCase(),
            nType = elem && elem.nodeType;
    
        if ( pass ) {
    Severity: Minor
    Found in app/lib/jquery/jquery-migrate.js - About 1 hr to fix

      Function clean has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          jQuery.clean = function( elems, context, fragment, scripts ) {
              // Set context per 1.8 logic
              context = context || document;
              context = !context.nodeType && context[0] || context;
              context = context.ownerDocument || context;
      Severity: Minor
      Found in app/lib/jquery/jquery-migrate.js - About 1 hr to fix

        Avoid deeply nested control flow statements.
        Open

                            if ( typeof elem.getElementsByTagName !== "undefined" ) {
                                // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
                                jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
        
                                // Splice the scripts into ret after their former ancestor and advance our index beyond them
        Severity: Major
        Found in app/lib/jquery/jquery-migrate.js - About 45 mins to fix

          Function add has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          jQuery.event.add = function( elem, types, handler, data, selector ){
          Severity: Minor
          Found in app/lib/jquery/jquery-migrate.js - About 35 mins to fix

            Function remove has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            jQuery.event.remove = function( elem, types, handler, selector, mappedTypes ){
            Severity: Minor
            Found in app/lib/jquery/jquery-migrate.js - About 35 mins to fix

              There are no issues that match your filters.

              Category
              Status