adobe/brackets

View on GitHub

Showing 1,809 of 3,294 total issues

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

        if (!this.$opacitySlider.find(".selector-base").is(":focus")) {
            this.$opacitySlider.find(".selector-base").focus();
        }
Severity: Major
Found in src/extensions/default/InlineColorEditor/ColorEditor.js and 2 other locations - About 50 mins to fix
src/extensions/default/InlineColorEditor/ColorEditor.js on lines 561..563
src/extensions/default/InlineColorEditor/ColorEditor.js on lines 573..575

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

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 NOT list prop-name hints right before curly bracket", function () {
                testEditor.setCursorPos({ line: 4, ch: 10 });    // inside .selector, before {
                expectNoHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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

        function setupTest(content, languageId) {
            var mock = SpecRunnerUtils.createMockEditor(content, languageId);
            testDocument = mock.doc;
            testEditor = mock.editor;
        }
Severity: Major
Found in src/extensions/default/CSSPseudoSelectorHints/unittests.js and 2 other locations - About 45 mins to fix
src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 48..52
src/extensions/default/CSSCodeHints/unittests.js on lines 78..82

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

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 list prop-name hints inside multi-line styletags with cursor in first line", function () {
                testEditor.setCursorPos({ line: 9, ch: 18 });   // inside style, after {
                expectHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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

        function setupTest(content, languageId) {
            var mock = SpecRunnerUtils.createMockEditor(content, languageId);
            testDocument = mock.doc;
            testEditor = mock.editor;
        }
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 2 other locations - About 45 mins to fix
src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 48..52
src/extensions/default/CSSPseudoSelectorHints/unittests.js on lines 54..58

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

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 NOT list prop-name hints right before style value context", function () {
                testEditor.setCursorPos({ line: 4, ch: 11 });    // after =
                expectNoHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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 list prop-name hints inside single-line styletags after semicolon", function () {
                testEditor.setCursorPos({ line: 1, ch: 37 });  // inside style, after ;
                expectHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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 NOT list hints to right of attribute value with no separating space", function () {
                testEditor.setCursorPos({ line: 5, ch: 14 });   // cursor between ' and >
                expectNoHints(HTMLCodeHints.attrHintProvider);
            });
Severity: Major
Found in src/extensions/default/HTMLCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563

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

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

        function setupTest(content, languageId) {
            var mock = SpecRunnerUtils.createMockEditor(content, languageId);
            testDocument = mock.doc;
            testEditor = mock.editor;
        }
Severity: Major
Found in src/extensions/default/CSSAtRuleCodeHints/unittests.js and 2 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 78..82
src/extensions/default/CSSPseudoSelectorHints/unittests.js on lines 54..58

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

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 NOT list prop-name hints after declaration of mediatype", function () {
                testEditor.setCursorPos({ line: 0, ch: 15 });    // after {
                expectNoHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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 NOT list prop-name hints between closed styletag and new opening styletag", function () {
                testEditor.setCursorPos({ line: 8, ch: 0 });    // right before <div
                expectNoHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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 NOT list prop-name hints if previous property is not closed properly", function () {
                testEditor.setCursorPos({ line: 16, ch: 6 });   // cursor directly after color
                expectNoHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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 NOT list prop-value hints for unknown prop-name", function () {
                testEditor.setCursorPos({ line: 15, ch: 12 });  // at bordborder:
                expectNoHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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 NOT list hints inside head-tag", function () {
                testEditor.setCursorPos({ line: 1, ch: 6 });    // between <head> and </head> {
                expectNoHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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 NOT list prop-name hints after style value context", function () {
                testEditor.setCursorPos({ line: 10, ch: 20 });    // after "'"
                expectNoHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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 NOT list hints after function declaration", function () {
                testEditor.setCursorPos({ line: 0, ch: 24 });    // after {  after function declaration
                expectNoHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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 list prop-name hints right after curly bracket", function () {
                testEditor.setCursorPos({ line: 3, ch: 7 });  // inside body-selector, after {
                expectHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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 list prop-name hints inside single-line styletags at start", function () {
                testEditor.setCursorPos({ line: 1, ch: 23 });  // inside style, after {
                expectHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 444..447
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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 NOT list hints right before curly bracket", function () {
                testEditor.setCursorPos({ line: 3, ch: 6 });    // inside body-selector, before {
                expectNoHints(CSSCodeHints.cssPropHintProvider);
            });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 14 other locations - About 45 mins to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 225..228
src/extensions/default/CSSCodeHints/unittests.js on lines 230..233
src/extensions/default/CSSCodeHints/unittests.js on lines 235..238
src/extensions/default/CSSCodeHints/unittests.js on lines 367..370
src/extensions/default/CSSCodeHints/unittests.js on lines 401..404
src/extensions/default/CSSCodeHints/unittests.js on lines 406..409
src/extensions/default/CSSCodeHints/unittests.js on lines 411..414
src/extensions/default/CSSCodeHints/unittests.js on lines 416..419
src/extensions/default/CSSCodeHints/unittests.js on lines 439..442
src/extensions/default/CSSCodeHints/unittests.js on lines 449..452
src/extensions/default/CSSCodeHints/unittests.js on lines 529..532
src/extensions/default/CSSCodeHints/unittests.js on lines 534..537
src/extensions/default/CSSCodeHints/unittests.js on lines 560..563
src/extensions/default/HTMLCodeHints/unittests.js on lines 219..222

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

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 (this.selectedIndex !== -1) {
            $(items[this.selectedIndex]).find("a").removeClass("highlight");
        }
Severity: Minor
Found in src/editor/CodeHintList.js and 1 other location - About 45 mins to fix
src/widgets/InlineMenu.js on lines 124..126

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

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