adobe/brackets

View on GitHub
src/extensions/default/HtmlEntityCodeHints/unittests.js

Summary

Maintainability
C
7 hrs
Test Coverage

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

            expect(testEditorAndDoc.editor.document.getRange({line: 45, ch: 12}, {line: 45, ch: 17})).toEqual("!");
Severity: Major
Found in src/extensions/default/HtmlEntityCodeHints/unittests.js and 2 other locations - About 55 mins to fix
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 143..143
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 153..153

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

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

                expect(testEditorAndDoc.editor.document.getRange({line: 17, ch: 16}, {line: 17, ch: 23})).toEqual("â");
Severity: Major
Found in src/extensions/default/HtmlEntityCodeHints/unittests.js and 2 other locations - About 55 mins to fix
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 139..139
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 143..143

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

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

            expect(testEditorAndDoc.editor.document.getRange({line: 45, ch: 12}, {line: 45, ch: 18})).toEqual("{");
Severity: Major
Found in src/extensions/default/HtmlEntityCodeHints/unittests.js and 2 other locations - About 55 mins to fix
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 139..139
src/extensions/default/HtmlEntityCodeHints/unittests.js on lines 153..153

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

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

        it("shouldn't show hints when inside an opening tag", function () {
            testEditorAndDoc.editor.setCursorPos({line: 21, ch: 11});

            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 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("should show hints when semi-colon on the same line", function () {
            testEditorAndDoc.editor.setCursorPos({line: 28, ch: 21});

            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 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 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 url", function () {
            testEditorAndDoc.editor.setCursorPos({line: 38, ch: 78});

            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 112..116

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

There are no issues that match your filters.

Category
Status