adobe/brackets

View on GitHub

Showing 1,809 of 3,294 total issues

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

            it("should hint at < before tag name", function () {
                // After < in <svg
                testEditor.setCursorPos({line: 1, ch: 1});
                var hintList = expectHints(SVGCodeHints.hintProvider);
                verifyHints(hintList, "a");
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 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
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: 4, ch: 51});
                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 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", function () {
                testEditor.setCursorPos({ line: 5, ch: 1 });

                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 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
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 within existing attribute", function () {
                testEditor.setCursorPos({ line: 5, ch: 7 });
                var hintList = expectHints(HTMLCodeHints.attrHintProvider);
                verifyAttrHints(hintList, "id");  // filtered on "i"
            });
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 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 at the end of the value", function () {
                // After baseline-shift="baseline
                testEditor.setCursorPos({line: 4, ch: 59});
                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 385..390
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 first attribute in multiple options", function () {
                // After preserveAspectRatio="x
                testEditor.setCursorPos({line: 2, ch: 52});
                var hintList = expectHints(SVGCodeHints.hintProvider);
                verifyHints(hintList, "xMaxYMax");
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 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 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

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

Severity
Category
Status
Source
Language