adobe/brackets

View on GitHub
src/utils/Async.js

Summary

Maintainability
B
6 hrs
Test Coverage

File Async.js has 255 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2012 - present Adobe Systems Incorporated. All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
Severity: Minor
Found in src/utils/Async.js - About 2 hrs to fix

    Function waitForAll has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function waitForAll(promises, failOnReject, timeout) {
            var masterDeferred = new $.Deferred(),
                results = [],
                count = 0,
                sawRejects = false;
    Severity: Minor
    Found in src/utils/Async.js - About 1 hr to fix

      Function doInParallel has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function doInParallel(items, beginProcessItem, failFast) {
              var promises = [];
              var masterDeferred = new $.Deferred();
      
              if (items.length === 0) {
      Severity: Minor
      Found in src/utils/Async.js - About 1 hr to fix

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

            function chain(functions, args) {
                var deferred = $.Deferred();
        
                function chainHelper(index, args) {
                    if (functions.length === index) {
        Severity: Minor
        Found in src/utils/Async.js - About 1 hr to fix

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

              function doSequentially(items, beginProcessItem, failAndStopFast) {
          
                  var masterDeferred = new $.Deferred(),
                      hasFailed = false;
          
          
          Severity: Minor
          Found in src/utils/Async.js - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status