jquery/jquery

View on GitHub
src/ajax.js

Summary

Maintainability
F
3 days
Test Coverage

Function ajax has 253 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 src/ajax.js - About 1 day to fix

    File ajax.js has 508 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    define( [
        "./core",
        "./var/document",
        "./var/isFunction",
        "./var/rnothtmlwhite",
    Severity: Major
    Found in src/ajax.js - About 1 day to fix

      Function done has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function done( status, nativeStatusText, responses, headers ) {
                  var isSuccess, success, error, response, modified,
                      statusText = nativeStatusText;
      
                  // Ignore repeat invocations
      Severity: Major
      Found in src/ajax.js - About 2 hrs to fix

        Function ajaxConvert has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function ajaxConvert( s, response, jqXHR, isSuccess ) {
            var conv2, current, conv, tmp, prev,
                converters = {},
        
                // Work with a copy of dataTypes in case we need to modify it for conversion
        Severity: Major
        Found in src/ajax.js - About 2 hrs to fix

          Function ajaxHandleResponses has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function ajaxHandleResponses( s, jqXHR, responses ) {
          
              var ct, type, finalDataType, firstDataType,
                  contents = s.contents,
                  dataTypes = s.dataTypes;
          Severity: Minor
          Found in src/ajax.js - About 1 hr to fix

            Avoid deeply nested control flow statements.
            Open

                                for ( conv2 in converters ) {
            
                                    // If conv2 outputs current
                                    tmp = conv2.split( " " );
                                    if ( tmp[ 1 ] === current ) {
            Severity: Major
            Found in src/ajax.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if ( conv && s.throws ) {
                                      response = conv( response );
                                  } else {
                                      try {
                                          response = conv( response );
              Severity: Major
              Found in src/ajax.js - About 45 mins to fix

                There are no issues that match your filters.

                Category
                Status