adobe/brackets

View on GitHub
src/extensions/default/JavaScriptCodeHints/unittests.js

Summary

Maintainability
F
1 mo
Test Coverage

File unittests.js has 1333 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: Major
Found in src/extensions/default/JavaScriptCodeHints/unittests.js - About 3 days to fix

    Function expectParameterHint has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function expectParameterHint(expectedParams, expectedParameter) {
                var requestHints = undefined,
                    request = null;
                
                function expectHint(hint) {
    Severity: Minor
    Found in src/extensions/default/JavaScriptCodeHints/unittests.js - About 1 hr to fix

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

              function expectParameterHint(expectedParams, expectedParameter) {
                  var requestHints = undefined,
                      request = null;
                  
                  function expectHint(hint) {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 2 days to fix
      src/extensions/default/JavaScriptQuickEdit/unittests.js on lines 357..406

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

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

                  it("should insert, not replace, property hints with no current query", function () {
                      var start   = { line: 6, ch: 0 },
                          middle  = { line: 6, ch: 3 },
                          end     = { line: 6, ch: 8 },
                          endplus = { line: 6, ch: 12 };
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 1 day to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 773..788
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 790..806

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

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

                  it("should replace property hints replacing a partial current query", function () {
                      var start   = { line: 6, ch: 0 },
                          middle  = { line: 6, ch: 6 },
                          end     = { line: 6, ch: 8 },
                          endplus = { line: 6, ch: 10 };
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 1 day to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 739..755
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 790..806

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

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

                  it("should replace property hints but not following delimiters", function () {
                      var start   = { line: 6, ch: 0 },
                          middle  = { line: 6, ch: 4 },
                          end     = { line: 6, ch: 9 },
                          endplus = { line: 6, ch: 14 };
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 1 day to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 739..755
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 773..788

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

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

                  it("should insert property hints with no current query", function () {
                      var start   = { line: 6, ch: 0 },
                          middle  = { line: 6, ch: 3 },
                          end     = { line: 6, ch: 8 };
      
      
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 day to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 757..771
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1010..1024
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1026..1040
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1042..1056

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

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

                  it("should insert hint as [\"my-key\"] make sure this works if nothing is typed after the '.'", function () {
                      var start = { line: 49, ch: 0 },
                          middle = { line: 49, ch: 4 },
                          end = { line: 49, ch: 13 };
      
      
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 day to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 722..737
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 757..771
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1010..1024
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1042..1056

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

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

                  it("should insert, not replace, property hints with a partial current query", function () {
                      var start   = { line: 6, ch: 0 },
                          middle  = { line: 6, ch: 6 },
                          end     = { line: 6, ch: 8 };
      
      
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 day to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 722..737
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1010..1024
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1026..1040
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1042..1056

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

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

                  it("should insert hint as '.for' since keywords can be used as property names", function () {
                      var start = { line: 49, ch: 0 },
                          middle = { line: 49, ch: 5 },
                          end = { line: 49, ch: 7 };
      
      
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 day to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 722..737
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 757..771
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1010..1024
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1026..1040

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

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

                  it("should insert hint as [\"my-key\"] since 'my-key' is not a valid property name", function () {
                      var start = { line: 49, ch: 0 },
                          middle = { line: 49, ch: 5 },
                          end = { line: 49, ch: 13 };
      
      
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 day to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 722..737
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 757..771
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1026..1040
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1042..1056

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

      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

                  it("should handle reading an invalid configuration file", function () {
                      getPreferences(testPath + "negative-test/.jscodehints");
                      waitsFor(function () {
                          return preferences !== null;
                      });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 5 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1591..1604

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

      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

                  it("should handle reading an empty configuration file", function () {
                      getPreferences(testPath + "defaults-test/.jscodehints");
                      waitsFor(function () {
                          return preferences !== null;
                      });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 5 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1608..1621

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

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

              function _waitForHints(hintObj, callback) {
                  var complete = false,
                      hintList = null;
      
                  if (hintObj.hasOwnProperty("hints")) {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 4 hrs to fix
      src/extensions/default/JavaScriptQuickEdit/unittests.js on lines 308..327
      src/extensions/default/PhpTooling/unittests.js on lines 253..272

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

      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

                  it("should close parameter hint when move off function to another function", function () {
                      var testPos = { line: 184, ch: 12 },
                          newPos  = { line: 181, ch: 12 };
                      testEditor.setCursorPos(testPos);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 4 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1248..1260

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

      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

                  it("should close parameter hint when move off function", function () {
                      var testPos = { line: 184, ch: 12 },
                          endPos  = { line: 184, ch: 19 };
                      testEditor.setCursorPos(testPos);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 4 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1262..1274

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

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

                  _waitForJump(jumpPromise, function (newCursor) {
                      expect(newCursor.line).toBe(expectedLocation.line);
                      expect(newCursor.ch).toBe(expectedLocation.ch);
                      if (expectedLocation.file) {
                          var activeEditor = EditorManager.getActiveEditor();
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 4 hrs to fix
      src/extensions/default/JavaScriptQuickEdit/unittests.js on lines 441..448
      src/extensions/default/PhpTooling/unittests.js on lines 390..397

      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 hintsPresentExact(hintObj, expectedHints) {
                  _waitForHints(hintObj, function (hintList) {
                      expect(hintList).toBeTruthy();
                      expect(hintList.length).toBe(expectedHints.length);
                      expectedHints.forEach(function (expectedHint, index) {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 3 hrs to fix
      src/extensions/default/JavaScriptQuickEdit/unittests.js on lines 338..346

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

      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 _waitForJump(jumpPromise, callback) {
                  var cursor = null,
                      complete = false;
      
                  jumpPromise.done(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 3 hrs to fix
      src/extensions/default/PhpTooling/unittests.js on lines 187..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 113.

      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

                  xit("should read properties from exported module", function () {
                      var start        = { line: 96, ch: 0 },
                          testPos          = { line: 96, ch: 9};
      
                      testDoc.replaceRange("hondaCar.", start);
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 3 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1501..1511

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

      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

                  xit("should read methods created in submodule module", function () {
                      var start        = { line: 62, ch: 0 },
                          testPos          = { line: 62, ch: 13};
      
                      testDoc.replaceRange("SearchEngine.", start);
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 3 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1534..1544

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

      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

                  it("should show argument from from .prototype.Method", function () {
                      var start = { line: 80, ch: 0 },
                          testPos = { line: 80, ch: 24 };
      
                      testDoc.replaceRange("myCustomer.setAmountDue(", start);
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 3 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1193..1201

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

      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

                  it("should show guessed argument type from current passing parameter", function () {
                      var start = { line: 80, ch: 0 },
                          testPos = { line: 80, ch: 24 };
                      testDoc.replaceRange("myCustomer.setAmountDue(10)", start);
                      testEditor.setCursorPos(testPos);
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 3 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 925..934

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

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

                  it("should list function type defined from .prototype", function () {
                      var start = { line: 59, ch: 10 };
                      testEditor.setCursorPos(start);
                      runs(function () {
                          expectParameterHint([{name: "a4", type: "Number"}, {name: "b4", type: "Number"}], 0);
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1346..1353
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1355..1362

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

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

                  it("should show function type code hint for function in script file inside html file", function () {
                      var start = { line: 22, ch: 17 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 908..914
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1355..1362

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

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

                  it("should show function type code hint for function in another script file inside html file", function () {
                      var start = { line: 23, ch: 17 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 908..914
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1346..1353

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

      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 _indexOf(hintList, hint) {
                  var index = -1,
                      counter = 0;
      
                  for (counter; counter < hintList.length; counter++) {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 2 hrs to fix
      src/extensions/default/PhpTooling/unittests.js on lines 231..242

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

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

                  xit("should show hints for members of referenced class", function () {
                      var start = { line: 8, ch: 15 };
      
                      runs(function () {
                          testEditor.setCursorPos(start);
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1467..1475
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1478..1486

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

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

                  xit("should read methods created in submodule", function () {
                      var start = { line: 19, ch: 15 };
      
                      runs(function () {
                          testEditor.setCursorPos(start);
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1467..1475
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1772..1780

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

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

                  it("should read methods created in submodule on this", function () {
                      var start = { line: 8, ch: 17 };
      
                      runs(function () {
                          testEditor.setCursorPos(start);
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1478..1486
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1772..1780

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

      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

                  it("should list later defined property names", function () {
                      var start = { line: 17, ch: 11 };
      
                      testEditor.setCursorPos(start);
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 989..997

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

      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

                  it("should list array containing functions", function () {
                      var testPos = { line: 142, ch: 7 };
      
                      testEditor.setCursorPos(testPos);
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 843..851

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

      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

                  it("should jump to the actual function definition, and not the exports line", function () {
                      var start = { line: 159, ch: 22 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1085..1092

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

      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

                  it("should jump to the definition in new module file", function () {
                      var start = { line: 40, ch: 22 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.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 79.

      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

                  it("should list parameter hint for an array parameter", function () {
                      var testPos = { line: 184, ch: 12 };
                      testEditor.setCursorPos(testPos);
                      runs(function () {
                          expectParameterHint([{name: "other", type: "Array.<Object>"}], -1);
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1203..1210

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

      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

                  it("should list parameter hint for record type annotation", function () {
                      var testPos = { line: 178, ch: 25 };
      
                      testEditor.setCursorPos(testPos);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1232..1238

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

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

                  it("should list parameter hint for a source array annotation", function () {
                      var testPos = { line: 200, ch: 20 };
                      testEditor.setCursorPos(testPos);
                      runs(function () {
                          expectParameterHint([{name: "a", type: "Array.<String>"}], 0);
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 936..943
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1337..1344

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

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

                  it("should show inner function type", function () {
                      var testPos = { line: 96, ch: 23 };
      
                      testEditor.setCursorPos(testPos);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1240..1246
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1337..1344

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

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

                  it("function type hint in html file", function () {
                      var start = { line: 36, ch: 12 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 936..943
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1240..1246

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

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

                  it("should jump to function", function () {
                      var start = { line: 43, ch: 0 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 11 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1067..1074
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1076..1083
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1103..1110
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1112..1119
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1121..1128
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1383..1390
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1392..1399
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1401..1408
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1410..1417
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1419..1426
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1747..1754

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

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

                  it("should jump to inner method", function () {
                      var start = { line: 96, ch: 32 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 11 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1058..1065
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1067..1074
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1076..1083
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1103..1110
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1112..1119
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1383..1390
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1392..1399
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1401..1408
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1410..1417
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1419..1426
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1747..1754

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

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

                  it("should jump to closure, early defined var", function () {
                      var start = { line: 17, ch: 9 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 11 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1058..1065
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1067..1074
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1103..1110
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1112..1119
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1121..1128
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1383..1390
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1392..1399
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1401..1408
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1410..1417
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1419..1426
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1747..1754

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

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

                  it("should jump to parameter passed in the method", function () {
                      var start = { line: 63, ch: 20 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 11 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1058..1065
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1067..1074
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1076..1083
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1112..1119
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1121..1128
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1383..1390
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1392..1399
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1401..1408
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1410..1417
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1419..1426
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1747..1754

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

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

                  it("should jump to var", function () {
                      var start = { line: 44, ch: 10 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 11 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1058..1065
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1076..1083
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1103..1110
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1112..1119
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1121..1128
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1383..1390
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1392..1399
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1401..1408
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1410..1417
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1419..1426
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1747..1754

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

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

                  it("should jump to funtion definition to loaded file2", function () {
                      var start = { line: 23, ch: 15 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 11 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1058..1065
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1067..1074
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1076..1083
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1103..1110
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1112..1119
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1121..1128
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1383..1390
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1392..1399
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1410..1417
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1419..1426
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1747..1754

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

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

                  it("should jump to funtion definition to loaded file1", function () {
                      var start = { line: 22, ch: 15 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 11 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1058..1065
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1067..1074
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1076..1083
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1103..1110
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1112..1119
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1121..1128
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1383..1390
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1401..1408
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1410..1417
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1419..1426
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1747..1754

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

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

                  it("should jump to parameter passed in anonymous method", function () {
                      var start = { line: 83, ch: 25 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 11 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1058..1065
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1067..1074
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1076..1083
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1103..1110
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1121..1128
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1383..1390
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1392..1399
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1401..1408
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1410..1417
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1419..1426
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1747..1754

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

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

                  it("should jump to function name with non ascii chars", function () {
                      var start        = { line: 16, ch: 12 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 11 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1058..1065
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1067..1074
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1076..1083
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1103..1110
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1112..1119
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1121..1128
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1383..1390
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1392..1399
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1401..1408
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1410..1417
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1419..1426

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

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

                  it("should jump to definition inside html file", function () {
                      var start = { line: 36, ch: 10 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 11 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1058..1065
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1067..1074
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1076..1083
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1103..1110
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1112..1119
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1121..1128
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1392..1399
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1401..1408
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1410..1417
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1419..1426
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1747..1754

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

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

                  it("should jump to property definition to loaded file1", function () {
                      var start = { line: 23, ch: 28 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 11 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1058..1065
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1067..1074
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1076..1083
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1103..1110
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1112..1119
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1121..1128
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1383..1390
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1392..1399
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1401..1408
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1419..1426
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1747..1754

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

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

                  it("should jump to property definition to loaded file2", function () {
                      var start = { line: 23, ch: 18 };
      
                      testEditor.setCursorPos(start);
                      runs(function () {
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 11 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1058..1065
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1067..1074
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1076..1083
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1103..1110
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1112..1119
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1121..1128
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1383..1390
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1392..1399
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1401..1408
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1410..1417
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1747..1754

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

      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

                  _waitForHints(hintObj, function (hintList) {
                      expect(hintList).toBeTruthy();
                      expectedHints.forEach(function (expectedHint) {
                          expect(_indexOf(hintList, expectedHint)).not.toBe(-1);
                      });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 1 hr to fix
      src/extensions/default/PhpTooling/unittests.js on lines 215..220

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

      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

                  it("should list literal constants", function () {
                      testEditor.setCursorPos({ line: 6, ch: 0 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsPresent(hintObj, ["null", "undefined", "true", "false"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 484..488

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

      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

                  it("should list declared variable and function names in outer scope", function () {
                      testEditor.setCursorPos({ line: 6, ch: 0 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsPresent(hintObj, ["A2", "A3", "funB", "A1"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 533..537

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

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

                  it("should list keywords", function () {
                      testEditor.setCursorPos({ line: 6, ch: 0 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsPresent(hintObj, ["break", "case", "catch"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 515..519
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 527..531
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 551..555
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 593..597

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

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

                  it("should NOT list keywords on property lookups", function () {
                      testEditor.setCursorPos({ line: 17, ch: 11 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsAbsent(hintObj, ["case", "function", "var"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 497..501
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 515..519
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 527..531
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 551..555

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

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

                  it("should NOT list property names on value lookups", function () {
                      testEditor.setCursorPos({ line: 6, ch: 0 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsAbsent(hintObj, ["propA", "propB", "propC"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 497..501
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 515..519
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 527..531
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 593..597

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

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

                  it("should NOT list implicitly defined globals from missing JSLint annotations", function () {
                      testEditor.setCursorPos({ line: 6, ch: 0 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsAbsent(hintObj, ["ActiveXObject", "CScript", "VBArray"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 497..501
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 527..531
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 551..555
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 593..597

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

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

                  it("should NOT list implicitly defined globals from JSLint annotations in other files", function () {
                      testEditor.setCursorPos({ line: 6, ch: 0 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsAbsent(hintObj, ["spawn", "version", "toint32"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 497..501
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 515..519
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 551..555
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 593..597

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

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

                  xit("should list explicitly defined globals from JSLint annotations", function () {
                      testEditor.setCursorPos({ line: 6, ch: 0 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsPresent(hintObj, ["brackets", "$"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 521..525
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 539..543
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 545..549
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 581..585

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

                  it("should list identifier names that occur in other files", function () {
                      testEditor.setCursorPos({ line: 16, ch: 0 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsPresent(hintObj, ["D1", "D2"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 503..507
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 521..525
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 539..543
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 545..549

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

                  it("should NOT list variables, function names and parameter names in other files", function () {
                      testEditor.setCursorPos({ line: 6, ch: 0 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsAbsent(hintObj, ["E1", "E2"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 503..507
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 521..525
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 539..543
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 581..585

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

                  it("should NOT list variables, function names and parameter names out of scope", function () {
                      testEditor.setCursorPos({ line: 6, ch: 0 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsAbsent(hintObj, ["paramB2", "paramB1"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 503..507
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 521..525
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 545..549
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 581..585

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

                  it("should NOT list explicitly defined globals from JSLint annotations in other files", function () {
                      testEditor.setCursorPos({ line: 6, ch: 0 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsAbsent(hintObj, ["crazyGlobal", "anotherCrazyGlobal"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 503..507
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 539..543
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 545..549
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 581..585

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

                  it("should NOT list string literals from other files", function () {
                      testEditor.setCursorPos({ line: 6, ch: 0 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsAbsent(hintObj, ["a very nice string"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 563..567
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 575..579

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

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

                  it("should list property names that have been declared in the file", function () {
                      testEditor.setCursorPos({ line: 17, ch: 11 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsPresent(hintObj, ["propB"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 563..567
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 569..573

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

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

                  xit("should list string literals that occur in the file", function () {
                      testEditor.setCursorPos({ line: 12, ch: 0 });
                      var hintObj = expectHints(JSCodeHints.jsHintProvider);
                      hintsPresent(hintObj, ["use strict"]);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 1 hr to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 569..573
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 575..579

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

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

                      runs(function () {
                          testEditor.setCursorPos(testPos);
                          var hintObj = expectHints(JSCodeHints.jsHintProvider);
                          hintsPresentExact(hintObj, ["fun測试()"]);
                      });
      Severity: Minor
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 40 mins to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1715..1719
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1740..1744

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

                      runs(function () {
                          testEditor.setCursorPos(start);
                          var hintObj = expectHints(JSCodeHints.jsHintProvider);
                          hintsPresentExact(hintObj, ["fun測试"]);
                      });
      Severity: Minor
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 40 mins to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1720..1724
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1740..1744

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

                      runs(function () {
                          testEditor.setCursorPos(start);
                          var hintObj = expectHints(JSCodeHints.jsHintProvider);
                          hintsPresentExact(hintObj, ["frenchçProp()"]);
                      });
      Severity: Minor
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 40 mins to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1715..1719
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1720..1724

      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

                      identifierList.forEach(function (element) {
                          var result = HintUtils.maybeIdentifier(element);
                          expect(result).toBe(true);
                      });
      Severity: Minor
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 35 mins to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1686..1689

      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

                      invalidIdentifierList.forEach(function (element) {
                          var result = HintUtils.maybeIdentifier(element);
                          expect(result).toBe(false);
                      });
      Severity: Minor
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 1 other location - About 35 mins to fix
      src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1691..1694

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

                  it("should not list hints in string literal", function () {
                      testEditor.setCursorPos({ line: 20, ch: 22 });
                      expectNoHints(JSCodeHints.jsHintProvider);
                  });
      Severity: Major
      Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 5 other locations - About 35 mins to fix
      src/extensions/default/HTMLCodeHints/unittests.js on lines 190..193
      src/extensions/default/HTMLCodeHints/unittests.js on lines 273..276
      src/extensions/default/HTMLCodeHints/unittests.js on lines 351..354
      src/extensions/default/PrefsCodeHints/unittests.js on lines 486..489
      src/extensions/default/PrefsCodeHints/unittests.js on lines 490..493

      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

      There are no issues that match your filters.

      Category
      Status