adobe/brackets

View on GitHub

Showing 1,809 of 3,294 total issues

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

            if (nexttoken.id === '=') {
                if (!option.boss)
                    warning("Expected a conditional expression and instead saw an assignment.");
                advance('=');
                expression(20);
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/external/jshint.js on lines 3521..3526
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/external/jshint.js on lines 3584..3589
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/external/jshint.js on lines 3796..3801

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

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

                if (nexttoken.id === '=') {
                    if (!option.boss)
                        warning("Expected a conditional expression and instead saw an assignment.");
                    advance('=');
                    expression(20);
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/external/jshint.js on lines 3521..3526
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/external/jshint.js on lines 3584..3589
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/external/jshint.js on lines 3725..3730

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

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

        if (nexttoken.id === '=') {
            if (!option.boss)
                warning("Expected a conditional expression and instead saw an assignment.");
            advance('=');
            expression(20);
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/external/jshint.js on lines 3521..3526
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/external/jshint.js on lines 3725..3730
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/external/jshint.js on lines 3796..3801

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

        it("should show hints when another entity is in the same line", function () {
            testEditorAndDoc.editor.setCursorPos({line: 12, ch: 23});

            expectHints(hintProvider);
        });
Severity: Major
Found in src/extensions/default/HtmlEntityCodeHints/unittests.js and 7 other locations - About 35 mins to fix
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 68..72
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 88..92
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 94..98
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 100..104
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 106..110
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 112..116
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 118..122

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

        it("shouldn't show hints in attribute name", function () {
            testEditorAndDoc.editor.setCursorPos({line: 32, ch: 12});

            expectNoHints(hintProvider);
        });
Severity: Major
Found in src/extensions/default/HtmlEntityCodeHints/unittests.js and 7 other locations - About 35 mins to fix
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 68..72
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 74..78
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 88..92
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 94..98
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 100..104
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 112..116
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 118..122

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

        it("shouldn't show hints when inside a closing tag", function () {
            testEditorAndDoc.editor.setCursorPos({line: 24, ch: 15});

            expectNoHints(hintProvider);
        });
Severity: Major
Found in src/extensions/default/HtmlEntityCodeHints/unittests.js and 7 other locations - About 35 mins to fix
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 68..72
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 74..78
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 88..92
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 100..104
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 106..110
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 112..116
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 118..122

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

            it("should NOT list hints to left of incomplete tag", function () {
                testEditor.setCursorPos({ line: 9, ch: 2 });
                expectNoHints(HTMLCodeHints.attrHintProvider);
            });
Severity: Major
Found in src/extensions/default/HTMLCodeHints/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/JavaScriptCodeHints/unittests.js on lines 479..482
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

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

            it("should NOT list hints within doctype 'tag'", function () {
                testEditor.setCursorPos({ line: 0, ch: 10 });
                expectNoHints(HTMLCodeHints.attrHintProvider);
            });
Severity: Major
Found in src/extensions/default/HTMLCodeHints/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 351..354
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 479..482
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

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

  $.fn.modal.noConflict = function () {
    $.fn.modal = old
    return this
  }
Severity: Major
Found in src/widgets/bootstrap-modal.js and 4 other locations - About 35 mins to fix
src/widgets/bootstrap-alerts.js on lines 88..91
src/widgets/bootstrap-button.js on lines 90..93
src/widgets/bootstrap-dropdown.js on lines 149..152
src/widgets/bootstrap-tab.js on lines 130..133

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

        it("should show hints when in Text in paragraph", function () {
            testEditorAndDoc.editor.setCursorPos({line: 7, ch: 17});

            expectHints(hintProvider);
        });
Severity: Major
Found in src/extensions/default/HtmlEntityCodeHints/unittests.js and 7 other locations - About 35 mins to fix
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 74..78
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 88..92
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 94..98
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 100..104
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 106..110
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 112..116
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 118..122

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

    domainManager.registerCommand(
        "FindInFiles",       // domain name
        "filesRemoved",    // command name
        removeFilesFromCache,   // command handler function
        false,          // this command is synchronous in Node
Severity: Major
Found in src/search/node/FindInFilesDomain.js and 4 other locations - About 35 mins to fix
src/search/node/FindInFilesDomain.js on lines 611..621
src/search/node/FindInFilesDomain.js on lines 622..632
src/search/node/FindInFilesDomain.js on lines 633..643
src/search/node/FindInFilesDomain.js on lines 655..665

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

        it("shouldn't show hints in attribute value", function () {
            testEditorAndDoc.editor.setCursorPos({line: 35, ch: 19});

            expectNoHints(hintProvider);
        });
Severity: Major
Found in src/extensions/default/HtmlEntityCodeHints/unittests.js and 7 other locations - About 35 mins to fix
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 68..72
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 74..78
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 88..92
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 94..98
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 100..104
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 106..110
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 118..122

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

            it("should NOT hint before opening brackets", function () {
                testEditor.setCursorPos({line: 10, ch: 22});
                expectNoHints(PrefsCodeHints.hintProvider);
            });
Severity: Major
Found in src/extensions/default/PrefsCodeHints/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/JavaScriptCodeHints/unittests.js on lines 479..482
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

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

    domainManager.registerCommand(
        "FindInFiles",       // domain name
        "documentChanged",    // command name
        documentChanged,   // command handler function
        false,          // this command is synchronous in Node
Severity: Major
Found in src/search/node/FindInFilesDomain.js and 4 other locations - About 35 mins to fix
src/search/node/FindInFilesDomain.js on lines 611..621
src/search/node/FindInFilesDomain.js on lines 622..632
src/search/node/FindInFilesDomain.js on lines 644..654
src/search/node/FindInFilesDomain.js on lines 655..665

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

  $.fn.button.noConflict = function () {
    $.fn.button = old
    return this
  }
Severity: Major
Found in src/widgets/bootstrap-button.js and 4 other locations - About 35 mins to fix
src/widgets/bootstrap-alerts.js on lines 88..91
src/widgets/bootstrap-dropdown.js on lines 149..152
src/widgets/bootstrap-modal.js on lines 224..227
src/widgets/bootstrap-tab.js on lines 130..133

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

    domainManager.registerCommand(
        "FindInFiles",       // domain name
        "initCache",    // command name
        initCache,   // command handler function
        false,          // this command is synchronous in Node
Severity: Major
Found in src/search/node/FindInFilesDomain.js and 4 other locations - About 35 mins to fix
src/search/node/FindInFilesDomain.js on lines 611..621
src/search/node/FindInFilesDomain.js on lines 622..632
src/search/node/FindInFilesDomain.js on lines 633..643
src/search/node/FindInFilesDomain.js on lines 644..654

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

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

jQuery.expr.filters.visible = function( elem ) {
    return !jQuery.expr.filters.hidden( elem );
};
Severity: Minor
Found in src/thirdparty/jquery-2.1.3.js and 1 other location - About 35 mins to fix
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/jquery-1.7.2.js on lines 6938..6940

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

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

    domainManager.registerCommand(
        "FindInFiles",       // domain name
        "collapseResults",    // command name
        setCollapseResults,   // command handler function
        false,          // this command is synchronous in Node
Severity: Major
Found in src/search/node/FindInFilesDomain.js and 4 other locations - About 35 mins to fix
src/search/node/FindInFilesDomain.js on lines 622..632
src/search/node/FindInFilesDomain.js on lines 633..643
src/search/node/FindInFilesDomain.js on lines 644..654
src/search/node/FindInFilesDomain.js on lines 655..665

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

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

    if (!selector) {
      selector = $this.attr('href')
      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
    }
Severity: Minor
Found in src/widgets/bootstrap-alerts.js and 1 other location - About 35 mins to fix
src/widgets/bootstrap-tab.js on lines 45..48

Duplicated Code

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

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

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

Tuning

This issue has a mass of 46.

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

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

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

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

Refactorings

Further Reading

Similar blocks of code found in 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

Severity
Category
Status
Source
Language