adobe/brackets

View on GitHub
src/LiveDevelopment/LiveDevelopment.js

Summary

Maintainability
F
2 wks
Test Coverage

Function LiveDevelopment has 902 lines of code (exceeds 25 allowed). Consider refactoring.
Open

define(function LiveDevelopment(require, exports, module) {
    "use strict";

    require("utils/Global");

Severity: Major
Found in src/LiveDevelopment/LiveDevelopment.js - About 4 days to fix

    Function LiveDevelopment has a Cognitive Complexity of 168 (exceeds 5 allowed). Consider refactoring.
    Open

    define(function LiveDevelopment(require, exports, module) {
        "use strict";
    
        require("utils/Global");
    
    
    Severity: Minor
    Found in src/LiveDevelopment/LiveDevelopment.js - About 3 days to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    File LiveDevelopment.js has 905 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: Major
    Found in src/LiveDevelopment/LiveDevelopment.js - About 2 days to fix

      Function _openInterstitialPage has 85 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function _openInterstitialPage() {
              var browserStarted  = false,
                  retryCount      = 0;
      
              // Open the live browser if the connection fails, retry 3 times
      Severity: Major
      Found in src/LiveDevelopment/LiveDevelopment.js - About 3 hrs to fix

        Function onConnectFail has 81 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                Inspector.connectToURL(launcherUrl).fail(function onConnectFail(err) {
                    if (err === "CANCEL") {
                        _openDeferred.reject(err);
                        return;
                    }
        Severity: Major
        Found in src/LiveDevelopment/LiveDevelopment.js - About 3 hrs to fix

          Function _getInitialDocFromCurrent has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function _getInitialDocFromCurrent() {
                  var doc = _getCurrentDocument(),
                      refPath,
                      i;
          
          
          Severity: Major
          Found in src/LiveDevelopment/LiveDevelopment.js - About 2 hrs to fix

            Function open has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function open(restart) {
                    // If close() is still pending, wait for close to finish before opening
                    if (_isPromisePending(_closeDeferred)) {
                        return _closeDeferred.then(function () {
                            return open(restart);
            Severity: Minor
            Found in src/LiveDevelopment/LiveDevelopment.js - About 1 hr to fix

              Function loadAgents has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function loadAgents() {
                      // If we're already loading agents return same promise
                      if (_loadAgentsPromise) {
                          return _loadAgentsPromise;
                      }
              Severity: Minor
              Found in src/LiveDevelopment/LiveDevelopment.js - About 1 hr to fix

                Function _close has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function _close(doCloseWindow, reason) {
                        WebSocketTransport.closeWebSocketServer();
                        if (_closeDeferred) {
                            return _closeDeferred;
                        } else {
                Severity: Minor
                Found in src/LiveDevelopment/LiveDevelopment.js - About 1 hr to fix

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

                      function _doInspectorDisconnect(doCloseWindow) {
                          var closePromise,
                              deferred    = new $.Deferred(),
                              connected   = Inspector.connected();
                  
                  
                  Severity: Minor
                  Found in src/LiveDevelopment/LiveDevelopment.js - About 1 hr to fix

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

                        function _prepareServer(doc) {
                            var deferred = new $.Deferred(),
                                showBaseUrlPrompt = false;
                    
                            _server = LiveDevServerManager.getServer(doc.file.fullPath);
                    Severity: Minor
                    Found in src/LiveDevelopment/LiveDevelopment.js - About 1 hr to fix

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                              ProjectManager.getAllFiles().done(function (allFiles) {
                                  var projectRoot = ProjectManager.getProjectRoot().fullPath,
                                      containingFolder,
                                      indexFileFound = false,
                                      stillInProjectTree = true;
                      Severity: Major
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 2 days to fix
                      src/LiveDevelopment/LiveDevMultiBrowser.js on lines 374..431

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 444.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Identical blocks of code found in 2 locations. Consider refactoring.
                      Open

                              if (showBaseUrlPrompt) {
                                  // Prompt for a base URL
                                  PreferencesDialogs.showProjectPreferencesDialog("", Strings.LIVE_DEV_NEED_BASEURL_MESSAGE)
                                      .done(function (id) {
                                          if (id === Dialogs.DIALOG_BTN_OK && ProjectManager.getBaseUrl()) {
                      Severity: Major
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 1 day to fix
                      src/LiveDevelopment/LiveDevMultiBrowser.js on lines 630..656

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 211.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                                  liveDocument.errors.forEach(function (error) {
                                      startLine = error.startPos.line;
                                      endLine = error.endPos.line;
                      
                                      for (i = startLine; i < endLine + 1; i++) {
                      Severity: Major
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 4 hrs to fix
                      src/LiveDevelopment/MultiBrowserImpl/documents/LiveDocument.js on lines 223..231

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 116.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          function _closeDocuments() {
                              if (_liveDocument) {
                                  _closeDocument(_liveDocument);
                                  _liveDocument = undefined;
                              }
                      Severity: Major
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 3 hrs to fix
                      src/LiveDevelopment/LiveDevMultiBrowser.js on lines 217..232

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 99.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          function _setStatus(status, closeReason) {
                              // Don't send a notification when the status didn't actually change
                              if (status === exports.status) {
                                  return;
                              }
                      Severity: Major
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 1 hr to fix
                      src/LiveDevelopment/LiveDevMultiBrowser.js on lines 201..211

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 73.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Identical blocks of code found in 2 locations. Consider refactoring.
                      Open

                              if (doc) {
                                  refPath = doc.file.fullPath;
                                  if (LiveDevelopmentUtils.isStaticHtmlFileExt(refPath) || LiveDevelopmentUtils.isServerHtmlFileExt(refPath)) {
                                      return new $.Deferred().resolve(doc);
                                  }
                      Severity: Major
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 1 hr to fix
                      src/LiveDevelopment/LiveDevMultiBrowser.js on lines 362..367

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 69.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          function _docIsOutOfSync(doc) {
                              var liveDoc = _server && _server.get(doc.file.fullPath),
                                  isLiveEditingEnabled = liveDoc && liveDoc.isLiveEditingEnabled();
                      
                              return doc.isDirty && !isLiveEditingEnabled;
                      Severity: Major
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 1 hr to fix
                      src/LiveDevelopment/LiveDevMultiBrowser.js on lines 278..283

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 69.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                              liveDocument.editor._codeMirror.operation(function () {
                                  while (true) {
                                      // Iterate over all lines that were previously marked with an error
                                      lineHandle = liveDocument._errorLineHandles.pop();
                      
                      
                      Severity: Major
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 1 hr to fix
                      src/LiveDevelopment/MultiBrowserImpl/documents/LiveDocument.js on lines 251..262

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 65.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Identical blocks of code found in 2 locations. Consider refactoring.
                      Open

                              var absolutePath            = doc.file.fullPath,
                                  liveDocument            = absolutePath && _server.get(absolutePath),
                                  liveEditingEnabled      = liveDocument && liveDocument.isLiveEditingEnabled  && liveDocument.isLiveEditingEnabled();
                      Severity: Major
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 1 hr to fix
                      src/LiveDevelopment/LiveDevMultiBrowser.js on lines 730..732

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 58.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          function showHighlight() {
                              var doc = getLiveDocForEditor(EditorManager.getActiveEditor());
                      
                              if (doc && doc.updateHighlight) {
                                  doc.updateHighlight();
                      Severity: Major
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 1 hr to fix
                      src/LiveDevelopment/LiveDevMultiBrowser.js on lines 848..854

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 55.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          function _createLiveDocumentForFrame(doc) {
                              // create live document
                              doc._ensureMasterEditor();
                              _liveDocument = _createDocument(doc, doc._masterEditor);
                              _server.add(_liveDocument);
                      Severity: Minor
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 50 mins to fix
                      src/LiveDevelopment/LiveDevMultiBrowser.js on lines 504..509

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 52.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                                              if (err === FileSystemError.NOT_FOUND) {
                                                  message = Strings.ERROR_CANT_FIND_CHROME;
                                              } else {
                                                  message = StringUtils.format(Strings.ERROR_LAUNCHING_BROWSER, err);
                                              }
                      Severity: Minor
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 45 mins to fix
                      src/file/FileUtils.js on lines 200..204

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 50.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          function redrawHighlight() {
                              if (Inspector.connected() && agents.highlight) {
                                  agents.highlight.redraw();
                              }
                          }
                      Severity: Minor
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 40 mins to fix
                      src/LiveDevelopment/LiveDevelopment.js on lines 1410..1414

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 48.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          function hideHighlight() {
                              if (Inspector.connected() && agents.highlight) {
                                  agents.highlight.hide();
                              }
                          }
                      Severity: Minor
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 40 mins to fix
                      src/LiveDevelopment/LiveDevelopment.js on lines 1417..1421

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 48.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          function _showWrongDocError() {
                              Dialogs.showModalDialog(
                                  DefaultDialogs.DIALOG_ID_ERROR,
                                  Strings.LIVE_DEVELOPMENT_ERROR_TITLE,
                                  _makeTroubleshootingMessage(Strings.LIVE_DEV_NEED_HTML_MESSAGE)
                      Severity: Minor
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 35 mins to fix
                      src/LiveDevelopment/LiveDevelopment.js on lines 1130..1137

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 47.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          function _showLiveDevServerNotReadyError() {
                              Dialogs.showModalDialog(
                                  DefaultDialogs.DIALOG_ID_ERROR,
                                  Strings.LIVE_DEVELOPMENT_ERROR_TITLE,
                                  _makeTroubleshootingMessage(Strings.LIVE_DEV_SERVER_NOT_READY_MESSAGE)
                      Severity: Minor
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 35 mins to fix
                      src/LiveDevelopment/LiveDevelopment.js on lines 1121..1128

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 47.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Identical blocks of code found in 2 locations. Consider refactoring.
                      Open

                          function getCurrentProjectServerConfig() {
                              return {
                                  baseUrl: ProjectManager.getBaseUrl(),
                                  pathResolver: ProjectManager.makeProjectRelativeIfPossible,
                                  root: ProjectManager.getProjectRoot().fullPath
                      Severity: Minor
                      Found in src/LiveDevelopment/LiveDevelopment.js and 1 other location - About 30 mins to fix
                      src/LiveDevelopment/LiveDevMultiBrowser.js on lines 894..900

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 45.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      There are no issues that match your filters.

                      Category
                      Status