adobe/brackets

View on GitHub
src/languageTools/LanguageClientWrapper.js

Summary

Maintainability
F
4 days
Test Coverage

File LanguageClientWrapper.js has 475 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2019 - present Adobe. 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/languageTools/LanguageClientWrapper.js - About 7 hrs to fix

    Function validateRequestParams has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function validateRequestParams(type, params) {
            var validatedParams = null;
    
            params = params || {};
    
    
    Severity: Major
    Found in src/languageTools/LanguageClientWrapper.js - About 2 hrs to fix

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

          function validateNotificationParams(type, params) {
              var validatedParams = null;
      
              params = params || {};
      
      
      Severity: Minor
      Found in src/languageTools/LanguageClientWrapper.js - About 1 hr to fix

        Avoid too many return statements within this function.
        Open

                return $.Deferred().reject();
        Severity: Major
        Found in src/languageTools/LanguageClientWrapper.js - About 30 mins to fix

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

              LanguageClientWrapper.prototype.requestHints = function (params) {
                  return this._request(ToolingInfo.FEATURES.CODE_HINTS, params)
                      .then(function(response) {
                          if(response && response.items && response.items.length) {
                              logAnalyticsData("CODE_HINTS");
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 4 hrs to fix
          src/languageTools/LanguageClientWrapper.js on lines 378..388

          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 131.

          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

              LanguageClientWrapper.prototype.requestParameterHints = function (params) {
                  return this._request(ToolingInfo.FEATURES.PARAMETER_HINTS, params)
                      .then(function(response) {
                          if (response && response.signatures && response.signatures.length) {
                              logAnalyticsData("PARAM_HINTS");
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 4 hrs to fix
          src/languageTools/LanguageClientWrapper.js on lines 360..370

          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 131.

          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 (notificationHandlers && Array.isArray(notificationHandlers) && notificationHandlers.length) {
                      notificationHandlers.forEach(function (handler) {
                          if (validateHandler(handler)) {
                              handler.call(null, params.params);
                          }
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 2 hrs to fix
          src/languageTools/LanguageClient/LanguageClient.js on lines 174..182

          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 91.

          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

              LanguageClientWrapper.prototype.addOnCustomEventHandler = function (eventName, handler) {
                  if (validateHandler(handler)) {
                      if (!this._onEventHandlers[eventName]) {
                          this._onEventHandlers[eventName] = [];
                      }
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 2 hrs to fix
          src/languageTools/LanguageClient/LanguageClient.js on lines 194..202

          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 85.

          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 validateHandler(handler) {
                  var retval = false;
          
                  if (handler && typeof handler === "function") {
                      retval = true;
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 1 hr to fix
          src/languageTools/LanguageClient/LanguageClient.js on lines 40..50

          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 61.

          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 6 locations. Consider refactoring.
          Open

              LanguageClientWrapper.prototype.addBeforeProjectCloseHandler = function (handler) {
                  if (validateHandler(handler)) {
                      this._onEventHandlers["beforeProjectClose"].push(handler);
                  }
              };
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 5 other locations - About 50 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 574..578
          src/languageTools/LanguageClientWrapper.js on lines 586..590
          src/languageTools/LanguageClientWrapper.js on lines 592..596
          src/languageTools/LanguageClientWrapper.js on lines 598..602
          src/languageTools/LanguageClientWrapper.js on lines 604..608

          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 51.

          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 6 locations. Consider refactoring.
          Open

              LanguageClientWrapper.prototype.addOnDocumentDirtyFlagChangeHandler = function (handler) {
                  if (validateHandler(handler)) {
                      this._onEventHandlers["dirtyFlagChange"].push(handler);
                  }
              };
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 5 other locations - About 50 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 574..578
          src/languageTools/LanguageClientWrapper.js on lines 580..584
          src/languageTools/LanguageClientWrapper.js on lines 592..596
          src/languageTools/LanguageClientWrapper.js on lines 598..602
          src/languageTools/LanguageClientWrapper.js on lines 604..608

          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 51.

          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 6 locations. Consider refactoring.
          Open

              LanguageClientWrapper.prototype.addBeforeAppClose = function (handler) {
                  if (validateHandler(handler)) {
                      this._onEventHandlers["beforeAppClose"].push(handler);
                  }
              };
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 5 other locations - About 50 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 574..578
          src/languageTools/LanguageClientWrapper.js on lines 580..584
          src/languageTools/LanguageClientWrapper.js on lines 586..590
          src/languageTools/LanguageClientWrapper.js on lines 592..596
          src/languageTools/LanguageClientWrapper.js on lines 598..602

          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 51.

          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 6 locations. Consider refactoring.
          Open

              LanguageClientWrapper.prototype.addOnFileRenameHandler = function (handler) {
                  if (validateHandler(handler)) {
                      this._onEventHandlers["fileNameChange"].push(handler);
                  }
              };
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 5 other locations - About 50 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 574..578
          src/languageTools/LanguageClientWrapper.js on lines 580..584
          src/languageTools/LanguageClientWrapper.js on lines 586..590
          src/languageTools/LanguageClientWrapper.js on lines 592..596
          src/languageTools/LanguageClientWrapper.js on lines 604..608

          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 51.

          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 6 locations. Consider refactoring.
          Open

              LanguageClientWrapper.prototype.addOnProjectOpenHandler = function (handler) {
                  if (validateHandler(handler)) {
                      this._onEventHandlers["projectOpen"].push(handler);
                  }
              };
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 5 other locations - About 50 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 580..584
          src/languageTools/LanguageClientWrapper.js on lines 586..590
          src/languageTools/LanguageClientWrapper.js on lines 592..596
          src/languageTools/LanguageClientWrapper.js on lines 598..602
          src/languageTools/LanguageClientWrapper.js on lines 604..608

          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 51.

          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 6 locations. Consider refactoring.
          Open

              LanguageClientWrapper.prototype.addOnDocumentChangeHandler = function (handler) {
                  if (validateHandler(handler)) {
                      this._onEventHandlers["documentChange"].push(handler);
                  }
              };
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 5 other locations - About 50 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 574..578
          src/languageTools/LanguageClientWrapper.js on lines 580..584
          src/languageTools/LanguageClientWrapper.js on lines 586..590
          src/languageTools/LanguageClientWrapper.js on lines 598..602
          src/languageTools/LanguageClientWrapper.js on lines 604..608

          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 51.

          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

              LanguageClientWrapper.prototype._addOnRequestHandler = function (type, handler) {
                  if (validateHandler(handler)) {
                      this._onRequestHandler[type] = handler;
                  }
              };
          Severity: Minor
          Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 40 mins to fix
          src/languageTools/LanguageClient/LanguageClient.js on lines 188..192

          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

              LanguageClientWrapper.prototype.addOnTelemetryEvent = function (handler) {
                  this._addOnNotificationHandler(ToolingInfo.SERVICE_NOTIFICATIONS.TELEMETRY, handler);
              };
          Severity: Minor
          Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 35 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 457..459

          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

              LanguageClientWrapper.prototype.addOnCodeInspection = function (handler) {
                  this._addOnNotificationHandler(ToolingInfo.SERVICE_NOTIFICATIONS.DIAGNOSTICS, handler);
              };
          Severity: Minor
          Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 35 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 449..451

          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

              LanguageClientWrapper.prototype.notifyTextDocumentSave = function (params) {
                  this._notify(ToolingInfo.SYNCHRONIZE_EVENTS.DOCUMENT_SAVED, params);
              };
          Severity: Minor
          Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 35 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 441..443

          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 46.

          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

              LanguageClientWrapper.prototype.addOnLogMessage = function (handler) {
                  this._addOnNotificationHandler(ToolingInfo.SERVICE_NOTIFICATIONS.LOG_MESSAGE, handler);
              };
          Severity: Minor
          Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 35 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 541..543

          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 46.

          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 4 locations. Consider refactoring.
          Open

              LanguageClientWrapper.prototype.gotoDeclaration = function (params) {
                  return this._request(ToolingInfo.FEATURES.JUMP_TO_DECLARATION, params);
              };
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 3 other locations - About 30 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 373..375
          src/languageTools/LanguageClientWrapper.js on lines 409..411
          src/languageTools/LanguageClientWrapper.js on lines 414..416

          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

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

              LanguageClientWrapper.prototype.findReferences = function (params) {
                  return this._request(ToolingInfo.FEATURES.FIND_REFERENCES, params);
              };
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 3 other locations - About 30 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 373..375
          src/languageTools/LanguageClientWrapper.js on lines 404..406
          src/languageTools/LanguageClientWrapper.js on lines 409..411

          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

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

              LanguageClientWrapper.prototype.gotoImplementation = function (params) {
                  return this._request(ToolingInfo.FEATURES.JUMP_TO_IMPL, params);
              };
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 3 other locations - About 30 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 373..375
          src/languageTools/LanguageClientWrapper.js on lines 404..406
          src/languageTools/LanguageClientWrapper.js on lines 414..416

          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

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

              LanguageClientWrapper.prototype.getAdditionalInfoForHint = function (params) {
                  return this._request(ToolingInfo.FEATURES.CODE_HINT_INFO, params);
              };
          Severity: Major
          Found in src/languageTools/LanguageClientWrapper.js and 3 other locations - About 30 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 404..406
          src/languageTools/LanguageClientWrapper.js on lines 409..411
          src/languageTools/LanguageClientWrapper.js on lines 414..416

          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

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

              LanguageClientWrapper.prototype.notifyTextDocumentChanged = function (params) {
                  this._notify(ToolingInfo.SYNCHRONIZE_EVENTS.DOCUMENT_CHANGED, params);
              };
          Severity: Minor
          Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 30 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 531..533

          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

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

              LanguageClientWrapper.prototype.notifyTextDocumentClosed = function (params) {
                  this._notify(ToolingInfo.SYNCHRONIZE_EVENTS.DOCUMENT_CLOSED, params);
              };
          Severity: Minor
          Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 30 mins to fix
          src/languageTools/LanguageClientWrapper.js on lines 536..538

          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