adobe/brackets

View on GitHub

Showing 1,809 of 3,294 total issues

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

            if ( oRange === "max" && this.orientation === "horizontal" ) {
                this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
            }
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.slider.js on lines 628..630

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

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

        else if (/^(sw)$/.test(a)) {
            that.size.width = os.width + ox;
            that.size.height = os.height + oy;
            that.position.left = op.left - ox;
        }
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.resizable.js on lines 776..791

Duplicated Code

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

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

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

Tuning

This issue has a mass of 73.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 73.

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

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

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

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

Refactorings

Further Reading

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

        else if (/^(ne)$/.test(a)) {
            that.size.width = os.width + ox;
            that.size.height = os.height + oy;
            that.position.top = op.top - oy;
        }
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.ui.resizable.js on lines 781..791

Duplicated Code

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

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

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

Tuning

This issue has a mass of 73.

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

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

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

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

Refactorings

Further Reading

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

    wrap: function( html ) {
        var isFunction = jQuery.isFunction( html );

        return this.each(function(i) {
            jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
src/thirdparty/jquery-2.1.3.js on lines 8382..8388

Duplicated Code

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

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

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

Tuning

This issue has a mass of 73.

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

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

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

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

Refactorings

Further Reading

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

                    for ( l = attr.length; i < l; i++ ) {
                        name = attr[i].name;

                        if ( name.indexOf( "data-" ) === 0 ) {
                            name = jQuery.camelCase( name.substring(5) );
src/thirdparty/jquery-2.1.3.js on lines 3791..3797

Duplicated Code

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

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

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

Tuning

This issue has a mass of 73.

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

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

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

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

Refactorings

Further Reading

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

                        if ( attrs[ i ] ) {
                            name = attrs[ i ].name;
                            if ( name.indexOf( "data-" ) === 0 ) {
                                name = jQuery.camelCase( name.slice(5) );
                                dataAttr( elem, name, data[ name ] );
Severity: Major
Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 1 hr to fix
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 1924..1932

Duplicated Code

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

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

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

Tuning

This issue has a mass of 73.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 73.

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

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

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

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

Refactorings

Further Reading

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

    wrap: function( html ) {
        var isFunction = jQuery.isFunction( html );

        return this.each(function( i ) {
            jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
Severity: Major
Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 1 hr to fix
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 5828..5834

Duplicated Code

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

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

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

Tuning

This issue has a mass of 73.

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

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

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

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

Refactorings

Further Reading

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

    DOMNode.prototype.previousSibling = function previousSibling() {
        if (!this.parent) {
            return null;
        }
        return this.parent.children[this.parent.indexOfChild(this) - 1];
Severity: Major
Found in src/LiveDevelopment/Agents/DOMNode.js and 1 other location - About 1 hr to fix
src/LiveDevelopment/Agents/DOMNode.js on lines 321..326

Duplicated Code

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

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

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

Tuning

This issue has a mass of 73.

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

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

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

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

Refactorings

Further Reading

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

    DOMNode.prototype.nextSibling = function nextSibling() {
        if (!this.parent) {
            return null;
        }
        return this.parent.children[this.parent.indexOfChild(this) + 1];
Severity: Major
Found in src/LiveDevelopment/Agents/DOMNode.js and 1 other location - About 1 hr to fix
src/LiveDevelopment/Agents/DOMNode.js on lines 313..318

Duplicated Code

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

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

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

Tuning

This issue has a mass of 73.

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

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

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

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

Refactorings

Further Reading

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

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

Severity
Category
Status
Source
Language