adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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

    queue: function( elem, type, data ) {
        var queue;

        if ( elem ) {
            type = ( type || "fx" ) + "queue";
Severity: Major
Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 5 hrs to fix
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 2082..2098

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

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

                "symbolKind": [
                    SymbolKind.File,
                    SymbolKind.Module,
                    SymbolKind.Namespace,
                    SymbolKind.Package,
Severity: Major
Found in src/languageTools/node/RegisterLanguageClientInfo.js and 1 other location - About 5 hrs to fix
src/languageTools/node/RegisterLanguageClientInfo.js on lines 178..205

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

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

Function Editor has 126 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function Editor(document, makeMasterEditor, container, range, options) {
        var self = this;

        var isReadOnly = (options && options.isReadOnly) || !document.editable;

Severity: Major
Found in src/editor/Editor.js - About 5 hrs to fix

    Function _performChanges has 126 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function _performChanges() {
            // If an extension was removed or updated, prompt the user to quit Brackets.
            var hasRemovedExtensions    = ExtensionManager.hasExtensionsToRemove(),
                hasUpdatedExtensions    = ExtensionManager.hasExtensionsToUpdate(),
                hasDisabledExtensions   = ExtensionManager.hasExtensionsToDisable();
    Severity: Major
    Found in src/extensibility/ExtensionManagerDialog.js - About 5 hrs to fix

      Consider simplifying this complex logical expression.
      Open

                  if ( event.pageX == null && original.clientX != null ) {
                      eventDoc = event.target.ownerDocument || document;
                      doc = eventDoc.documentElement;
                      body = eventDoc.body;
      
      

        Function equiv has 125 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        QUnit.equiv = (function() {
        
            // Call the o related callback with the given arguments.
            function bindCallbacks( o, callbacks, args ) {
                var prop = QUnit.objectType( o );

          Consider simplifying this complex logical expression.
          Open

                      if ( event.pageX == null && original.clientX != null ) {
                          eventDoc = event.target.ownerDocument || document;
                          doc = eventDoc.documentElement;
                          body = eventDoc.body;
          
          
          Severity: Critical
          Found in src/thirdparty/jquery-2.1.3.js - About 5 hrs to fix

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

                        left: (
                            pos.left                                                                // The absolute mouse position
                            + this.offset.relative.left * mod                                        // Only for relative positioned nodes: Relative offset from element to offset parent
                            + this.offset.parent.left * mod                                            // The offsetParent's offset without borders (offset + border)
                            - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
            src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.sortable.js on lines 886..891

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

            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

                        top: (
                            pos.top                                                                    // The absolute mouse position
                            + this.offset.relative.top * mod                                        // Only for relative positioned nodes: Relative offset from element to offset parent
                            + this.offset.parent.top * mod                                            // The offsetParent's offset without borders (offset + border)
                            - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
            src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.sortable.js on lines 892..897

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

            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

                    while (TokenUtils.moveSkippingWhitespace(TokenUtils.movePrevToken, ctxPrev)) {
                        if (ctxPrev.token.type === null) {
                            if (ctxPrev.token.string === "}") {
                                braceParity++;
                            } else if (ctxPrev.token.string === "{") {
            Severity: Major
            Found in src/language/JSONUtils.js and 1 other location - About 5 hrs to fix
            src/language/JSONUtils.js on lines 163..177

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

            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

                    while (TokenUtils.moveSkippingWhitespace(TokenUtils.moveNextToken, ctxNext)) {
                        if (ctxNext.token.type === null) {
                            if (ctxNext.token.string === "{") {
                                braceParity++;
                            } else if (ctxNext.token.string === "}") {
            Severity: Major
            Found in src/language/JSONUtils.js and 1 other location - About 5 hrs to fix
            src/language/JSONUtils.js on lines 143..157

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

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

                        it("should extract property expression", function () {
                            testEditor.setSelection({line: 23, ch: 4}, {line: 23, ch: 11});
            
                            var prevDocLength = testDoc.getText().length;
            
            
            Severity: Major
            Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 12 other locations - About 4 hrs to fix
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 100..111
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 113..124
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 176..187
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 189..200
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 214..225
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 227..238
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 240..251
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 253..264
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 266..277
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 279..290
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 292..303
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 365..376

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

                        it("should extract await expression", function () {
                            testEditor.setSelection({line: 77, ch: 12}, {line: 77, ch: 42});
            
                            var prevDocLength = testDoc.getText().length;
            
            
            Severity: Major
            Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 12 other locations - About 4 hrs to fix
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 100..111
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 113..124
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 145..156
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 176..187
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 189..200
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 214..225
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 227..238
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 240..251
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 253..264
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 266..277
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 279..290
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 365..376

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

                        it("should extract new expression", function () {
                            testEditor.setSelection({line: 50, ch: 4}, {line: 50, ch: 16});
            
                            var prevDocLength = testDoc.getText().length;
            
            
            Severity: Major
            Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 12 other locations - About 4 hrs to fix
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 100..111
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 113..124
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 145..156
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 176..187
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 189..200
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 214..225
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 227..238
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 253..264
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 266..277
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 279..290
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 292..303
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 365..376

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

                        it("should extract template literal", function () {
                            testEditor.setSelection({line: 62, ch: 4}, {line: 62, ch: 22});
            
                            var prevDocLength = testDoc.getText().length;
            
            
            Severity: Major
            Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 12 other locations - About 4 hrs to fix
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 100..111
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 113..124
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 145..156
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 176..187
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 189..200
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 214..225
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 227..238
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 240..251
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 253..264
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 279..290
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 292..303
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 365..376

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

                        it("should extract assignment expression", function () {
                            testEditor.setSelection({line: 41, ch: 3}, {line: 41, ch: 17});
            
                            var prevDocLength = testDoc.getText().length;
            
            
            Severity: Major
            Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 12 other locations - About 4 hrs to fix
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 100..111
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 113..124
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 145..156
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 176..187
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 189..200
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 227..238
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 240..251
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 253..264
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 266..277
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 279..290
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 292..303
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 365..376

            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 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/PhpTooling/unittests.js and 2 other locations - About 4 hrs to fix
            src/extensions/default/JavaScriptCodeHints/unittests.js on lines 137..156
            src/extensions/default/JavaScriptQuickEdit/unittests.js on lines 308..327

            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 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 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/JavaScriptQuickEdit/unittests.js and 2 other locations - About 4 hrs to fix
            src/extensions/default/JavaScriptCodeHints/unittests.js on lines 137..156
            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 13 locations. Consider refactoring.
            Open

                        it("should extract literal expression", function () {
                            testEditor.setSelection({line: 11, ch: 4}, {line: 11, ch: 7});
            
                            var prevDocLength = testDoc.getText().length;
            
            
            Severity: Major
            Found in src/extensions/default/JavaScriptRefactoring/unittests.js and 12 other locations - About 4 hrs to fix
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 113..124
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 145..156
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 176..187
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 189..200
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 214..225
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 227..238
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 240..251
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 253..264
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 266..277
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 279..290
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 292..303
            src/extensions/default/JavaScriptRefactoring/unittests.js on lines 365..376

            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

            Severity
            Category
            Status
            Source
            Language