adobe/brackets

View on GitHub

Showing 3,294 of 3,294 total issues

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

            it("should list all prop-name hints starting with 'b' in new line", function () {
                testEditor.setCursorPos({ line: 6, ch: 2 });

                var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                verifyAttrHints(hintList, "backface-visibility");  // filtered on "b"
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 5 other locations - About 1 hr to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 173..178
src/extensions/default/CSSCodeHints/unittests.js on lines 477..482
src/extensions/default/CSSCodeHints/unittests.js on lines 484..489
src/extensions/default/HTMLCodeHints/unittests.js on lines 169..173
src/extensions/default/HTMLCodeHints/unittests.js on lines 174..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 60.

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

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

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

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

Refactorings

Further Reading

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

            it("should hint in the middle of the attribute", function () {
                // After <rect wid
                testEditor.setCursorPos({line: 4, ch: 13});
                var hintList = expectHints(SVGCodeHints.hintProvider);
                verifyHints(hintList, "width");
Severity: Major
Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
src/extensions/default/SVGCodeHints/unittests.js on lines 399..404
src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

Duplicated Code

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

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

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

Tuning

This issue has a mass of 60.

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

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

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

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

Refactorings

Further Reading

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

            it("should list all prop-name hints in new line for style value context", function () {
                testEditor.setCursorPos({ line: 5, ch: 0 });

                var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                verifyAttrHints(hintList, "align-content");  // filtered on "empty string"
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 5 other locations - About 1 hr to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 173..178
src/extensions/default/CSSCodeHints/unittests.js on lines 180..185
src/extensions/default/CSSCodeHints/unittests.js on lines 484..489
src/extensions/default/HTMLCodeHints/unittests.js on lines 169..173
src/extensions/default/HTMLCodeHints/unittests.js on lines 174..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 60.

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

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

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

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

Refactorings

Further Reading

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

            it("should list all prop-name hints starting with 'b' in new line for style value context", function () {
                testEditor.setCursorPos({ line: 6, ch: 2 });

                var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                verifyAttrHints(hintList, "backface-visibility");  // filtered on "b"
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 5 other locations - About 1 hr to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 173..178
src/extensions/default/CSSCodeHints/unittests.js on lines 180..185
src/extensions/default/CSSCodeHints/unittests.js on lines 477..482
src/extensions/default/HTMLCodeHints/unittests.js on lines 169..173
src/extensions/default/HTMLCodeHints/unittests.js on lines 174..178

Duplicated Code

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

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

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

Tuning

This issue has a mass of 60.

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

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

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

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

Refactorings

Further Reading

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

            it("should list hints at end of existing attribute", function () {
                testEditor.setCursorPos({ line: 5, ch: 8 });
                var hintList = expectHints(HTMLCodeHints.attrHintProvider);
                verifyAttrHints(hintList, "id");  // filtered on "id"
            });
Severity: Major
Found in src/extensions/default/HTMLCodeHints/unittests.js and 5 other locations - About 1 hr to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 173..178
src/extensions/default/CSSCodeHints/unittests.js on lines 180..185
src/extensions/default/CSSCodeHints/unittests.js on lines 477..482
src/extensions/default/CSSCodeHints/unittests.js on lines 484..489
src/extensions/default/HTMLCodeHints/unittests.js on lines 169..173

Duplicated Code

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

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

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

Tuning

This issue has a mass of 60.

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

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

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

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

Refactorings

Further Reading

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

            it("should hint after first character", function () {
                // After baseline-shift="b
                testEditor.setCursorPos({line: 4, ch: 52});
                var hintList = expectHints(SVGCodeHints.hintProvider);
                verifyHints(hintList, "baseline");
Severity: Major
Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
src/extensions/default/SVGCodeHints/unittests.js on lines 399..404
src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

Duplicated Code

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

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

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

Tuning

This issue has a mass of 60.

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

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

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

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

Refactorings

Further Reading

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

            it("should hint inside the tag name", function () {
                // After <sv in <svg
                testEditor.setCursorPos({line: 1, ch: 3});
                var hintList = expectHints(SVGCodeHints.hintProvider);
                verifyHints(hintList, "svg");
Severity: Major
Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
src/extensions/default/SVGCodeHints/unittests.js on lines 399..404
src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

Duplicated Code

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

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

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

Tuning

This issue has a mass of 60.

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

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

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

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

Refactorings

Further Reading

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

            it("should hint for second value in multiple options", function () {
                // After m in meet
                testEditor.setCursorPos({line: 2, ch: 61});
                var hintList = expectHints(SVGCodeHints.hintProvider);
                verifyHints(hintList, "meet");
Severity: Major
Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
src/extensions/default/SVGCodeHints/unittests.js on lines 399..404

Duplicated Code

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

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

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

Tuning

This issue has a mass of 60.

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

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

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

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

Refactorings

Further Reading

Function QuickOpenPlugin has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function QuickOpenPlugin(name, languageIds, done, search, match, itemFocus, itemSelect, resultsFormatter, matcherOptions, label) {
Severity: Major
Found in src/search/QuickOpen.js - About 1 hr to fix

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

                it("should hint at the end of the attribute", function () {
                    // After <rect width
                    testEditor.setCursorPos({line: 4, ch: 15});
                    var hintList = expectHints(SVGCodeHints.hintProvider);
                    verifyHints(hintList, "width");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
    src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
    src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
    src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
    src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
    src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
    src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
    src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
    src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
    src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
    src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
    src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
    src/extensions/default/SVGCodeHints/unittests.js on lines 399..404
    src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

                it("should hint in the middle of value", function () {
                    // After baseline-shift="base
                    testEditor.setCursorPos({line: 4, ch: 55});
                    var hintList = expectHints(SVGCodeHints.hintProvider);
                    verifyHints(hintList, "baseline");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
    src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
    src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
    src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
    src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
    src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
    src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
    src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
    src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
    src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
    src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
    src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
    src/extensions/default/SVGCodeHints/unittests.js on lines 399..404
    src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

                it("should hint after first character of the attribute", function () {
                    // After <rect w
                    testEditor.setCursorPos({line: 4, ch: 11});
                    var hintList = expectHints(SVGCodeHints.hintProvider);
                    verifyHints(hintList, "width");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
    src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
    src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
    src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
    src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
    src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
    src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
    src/extensions/default/SVGCodeHints/unittests.js on lines 364..369
    src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
    src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
    src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
    src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
    src/extensions/default/SVGCodeHints/unittests.js on lines 399..404
    src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

                it("should hint after ='", function () {
                    // After baseline-shift='
                    testEditor.setCursorPos({line: 5, ch: 65});
                    var hintList = expectHints(SVGCodeHints.hintProvider);
                    verifyHints(hintList, "baseline");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 14 other locations - About 1 hr to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 126..131
    src/extensions/default/SVGCodeHints/unittests.js on lines 133..138
    src/extensions/default/SVGCodeHints/unittests.js on lines 140..145
    src/extensions/default/SVGCodeHints/unittests.js on lines 270..275
    src/extensions/default/SVGCodeHints/unittests.js on lines 277..282
    src/extensions/default/SVGCodeHints/unittests.js on lines 284..289
    src/extensions/default/SVGCodeHints/unittests.js on lines 291..296
    src/extensions/default/SVGCodeHints/unittests.js on lines 357..362
    src/extensions/default/SVGCodeHints/unittests.js on lines 371..376
    src/extensions/default/SVGCodeHints/unittests.js on lines 378..383
    src/extensions/default/SVGCodeHints/unittests.js on lines 385..390
    src/extensions/default/SVGCodeHints/unittests.js on lines 392..397
    src/extensions/default/SVGCodeHints/unittests.js on lines 399..404
    src/extensions/default/SVGCodeHints/unittests.js on lines 406..411

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

                    it("should clip min saturation on shift left arrow", function () {
                        testKey({
                            color:     "hsla(50, 0%, 50%, 0.5)",
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_LEFT,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 4 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 897..907
    src/extensions/default/InlineColorEditor/unittests.js on lines 977..987
    src/extensions/default/InlineColorEditor/unittests.js on lines 1017..1027
    src/extensions/default/InlineColorEditor/unittests.js on lines 1137..1147

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

            if ( type.indexOf( "." ) >= 0 ) {
                // Namespaced trigger; create a regexp to match event type in handle()
                namespaces = type.split(".");
                type = namespaces.shift();
                namespaces.sort();
    src/thirdparty/jquery-2.1.3.js on lines 4278..4283

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

            if ( type.indexOf(".") >= 0 ) {
                // Namespaced trigger; create a regexp to match event type in handle()
                namespaces = type.split(".");
                type = namespaces.shift();
                namespaces.sort();
    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 3126..3131

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

                    it("should clip max saturation on shift right arrow", function () {
                        testKey({
                            color:     "hsla(50, 100%, 50%, 0.5)",
                            item:      "$selectionBase",
                            key:       KeyEvent.DOM_VK_RIGHT,
    Severity: Major
    Found in src/extensions/default/InlineColorEditor/unittests.js and 4 other locations - About 1 hr to fix
    src/extensions/default/InlineColorEditor/unittests.js on lines 937..947
    src/extensions/default/InlineColorEditor/unittests.js on lines 977..987
    src/extensions/default/InlineColorEditor/unittests.js on lines 1017..1027
    src/extensions/default/InlineColorEditor/unittests.js on lines 1137..1147

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

            .animate( animation2, duration, o.easing, function() {
                if ( hide ) {
                    el.hide();
                }
                $.effects.restore( el, props );
    src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.effects.bounce.js on lines 94..101

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

                                    if (errorObj.error && errorObj.error.forEach) {
                                        console.error("Errors for", errorObj.item);
                                        errorObj.error.forEach(function (error) {
                                            console.error(Package.formatError(error));
                                        });
    Severity: Major
    Found in src/extensibility/ExtensionManagerDialog.js and 1 other location - About 1 hr to fix
    src/extensibility/ExtensionManager.js on lines 825..832

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

    Severity
    Category
    Status
    Source
    Language