adobe/brackets

View on GitHub
src/utils/NodeConnection.js

Summary

Maintainability
D
1 day
Test Coverage

File NodeConnection.js has 322 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2013 - 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/NodeConnection.js - About 3 hrs to fix

    Function _receive has 65 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        NodeConnection.prototype._receive = function (message) {
            var responseDeferred = null;
            var data = message.data;
            var m;
    
    
    Severity: Major
    Found in src/utils/NodeConnection.js - About 2 hrs to fix

      Function connect has 61 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          NodeConnection.prototype.connect = function (autoReconnect) {
              var self = this;
              self._autoReconnect = autoReconnect;
              var deferred = $.Deferred();
              var attemptCount = 0;
      Severity: Major
      Found in src/utils/NodeConnection.js - About 2 hrs to fix

        Function _refreshInterface has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            NodeConnection.prototype._refreshInterface = function () {
                var deferred = $.Deferred();
                var self = this;
        
                var pendingDeferreds = this._pendingInterfaceRefreshDeferreds;
        Severity: Major
        Found in src/utils/NodeConnection.js - About 2 hrs to fix

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

                  function registerHandlersAndDomains(ws, port) {
                      // Called if we succeed at the final setup
                      function success() {
                          self._ws.onclose = function () {
                              if (self._autoReconnect) {
          Severity: Minor
          Found in src/utils/NodeConnection.js - About 1 hr to fix

            Function refreshInterfaceCallback has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    function refreshInterfaceCallback(spec) {
                        function makeCommandFunction(domainName, commandSpec) {
                            return function () {
                                var deferred = $.Deferred();
                                var parameters = Array.prototype.slice.call(arguments, 0);
            Severity: Minor
            Found in src/utils/NodeConnection.js - About 1 hr to fix

              There are no issues that match your filters.

              Category
              Status