angular/angular.js

View on GitHub
src/ng/httpBackend.js

Summary

Maintainability
C
7 hrs
Test Coverage

Function createHttpBackend has 119 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {
  // TODO(vojta): fix the signature
  return function(method, url, post, callback, headers, timeout, withCredentials, responseType, eventHandlers, uploadEventHandlers) {
    url = url || $browser.url();

Severity: Major
Found in src/ng/httpBackend.js - About 4 hrs to fix

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

      function jsonpReq(url, callbackPath, done) {
        url = url.replace('JSON_CALLBACK', callbackPath);
        // we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.:
        // - fetches local scripts via XHR and evals them
        // - adds and immediately removes script elements from the document
    Severity: Minor
    Found in src/ng/httpBackend.js - About 1 hr to fix

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

          function completeRequest(callback, status, response, headersString, statusText, xhrStatus) {
      Severity: Minor
      Found in src/ng/httpBackend.js - About 45 mins to fix

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

        function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {
        Severity: Minor
        Found in src/ng/httpBackend.js - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status