adobe/brackets

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

Summary

Maintainability
F
1 wk
Test Coverage

File unittests.js has 661 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2013 - present Adobe Systems Incorporated. All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js - About 1 day to fix

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

                it("should list only prop-name hint border-color for style value context", function () {
                    // insert semicolon after previous rule to avoid incorrect tokenizing
                    testDocument.replaceRange(";", { line: 8, ch: 8 });
    
                    testEditor.setCursorPos({ line: 9, ch: 12 });
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 3 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 205..217

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

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

                it("should list only prop-name hint border-color", function () {
                    // insert semicolon after previous rule to avoid incorrect tokenizing
                    testDocument.replaceRange(";", { line: 8, ch: 8 });
    
                    testEditor.setCursorPos({ line: 9, ch: 12 });
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 3 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 509..521

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

    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

                it("should insert prop-name before an existing one", function () {
                    testEditor.setCursorPos({ line: 10, ch: 1 });   // cursor before border-color:
                    selectHint(CSSCodeHints.cssPropHintProvider, "float");
                    expect(testDocument.getLine(10)).toBe(" float:  border-color: red;");
                    expectCursorAt({ line: 10, ch: 8 });
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 221..226
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 228..233

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

    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 verifyListsAreIdentical(hintList, values) {
                var i;
                expect(hintList.length).toBe(values.length);
                for (i = 0; i < values.length; i++) {
                    expect(hintList[i]).toBe(values[i]);
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 75..81
    src/extensions/default/CSSPseudoSelectorHints/unittests.js on lines 81..87

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

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

                it("should list all prop-name hints starting with 'bord' ", function () {
                    // insert semicolon after previous rule to avoid incorrect tokenizing
                    testDocument.replaceRange(";", { line: 6, ch: 2 });
    
                    testEditor.setCursorPos({ line: 7, ch: 5 });
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 196..203
    src/extensions/default/CSSCodeHints/unittests.js on lines 340..347
    src/extensions/default/CSSCodeHints/unittests.js on lines 349..356
    src/extensions/default/CSSCodeHints/unittests.js on lines 358..365
    src/extensions/default/CSSCodeHints/unittests.js on lines 491..498
    src/extensions/default/CSSCodeHints/unittests.js on lines 500..507

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

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

                it("should list all prop-values starting with 'in' for 'display' after colon and whitespace", function () {
                    // insert semicolon after previous rule to avoid incorrect tokenizing
                    testDocument.replaceRange(";", { line: 13, ch: 10 });
    
                    testEditor.setCursorPos({ line: 14, ch: 12 });
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 187..194
    src/extensions/default/CSSCodeHints/unittests.js on lines 196..203
    src/extensions/default/CSSCodeHints/unittests.js on lines 340..347
    src/extensions/default/CSSCodeHints/unittests.js on lines 349..356
    src/extensions/default/CSSCodeHints/unittests.js on lines 491..498
    src/extensions/default/CSSCodeHints/unittests.js on lines 500..507

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

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

                it("should list all prop-values for 'display' after colon", function () {
                    // insert semicolon after previous rule to avoid incorrect tokenizing
                    testDocument.replaceRange(";", { line: 12, ch: 5 });
    
                    testEditor.setCursorPos({ line: 13, ch: 9 });
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 187..194
    src/extensions/default/CSSCodeHints/unittests.js on lines 196..203
    src/extensions/default/CSSCodeHints/unittests.js on lines 349..356
    src/extensions/default/CSSCodeHints/unittests.js on lines 358..365
    src/extensions/default/CSSCodeHints/unittests.js on lines 491..498
    src/extensions/default/CSSCodeHints/unittests.js on lines 500..507

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

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

                it("should list all prop-values for 'display' after colon and whitespace", function () {
                    // insert semicolon after previous rule to avoid incorrect tokenizing
                    testDocument.replaceRange(";", { line: 12, ch: 5 });
    
                    testEditor.setCursorPos({ line: 13, ch: 10 });
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 187..194
    src/extensions/default/CSSCodeHints/unittests.js on lines 196..203
    src/extensions/default/CSSCodeHints/unittests.js on lines 340..347
    src/extensions/default/CSSCodeHints/unittests.js on lines 358..365
    src/extensions/default/CSSCodeHints/unittests.js on lines 491..498
    src/extensions/default/CSSCodeHints/unittests.js on lines 500..507

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

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

                it("should list all prop-name hints starting with 'bord' for style value context", function () {
                    // insert semicolon after previous rule to avoid incorrect tokenizing
                    testDocument.replaceRange(";", { line: 6, ch: 2 });
    
                    testEditor.setCursorPos({ line: 7, ch: 5 });
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 187..194
    src/extensions/default/CSSCodeHints/unittests.js on lines 196..203
    src/extensions/default/CSSCodeHints/unittests.js on lines 340..347
    src/extensions/default/CSSCodeHints/unittests.js on lines 349..356
    src/extensions/default/CSSCodeHints/unittests.js on lines 358..365
    src/extensions/default/CSSCodeHints/unittests.js on lines 500..507

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

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

                it("should list all prop-name hints starting with 'border-' ", function () {
                    // insert semicolon after previous rule to avoid incorrect tokenizing
                    testDocument.replaceRange(";", { line: 7, ch: 5 });
    
                    testEditor.setCursorPos({ line: 8, ch: 8 });
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 187..194
    src/extensions/default/CSSCodeHints/unittests.js on lines 340..347
    src/extensions/default/CSSCodeHints/unittests.js on lines 349..356
    src/extensions/default/CSSCodeHints/unittests.js on lines 358..365
    src/extensions/default/CSSCodeHints/unittests.js on lines 491..498
    src/extensions/default/CSSCodeHints/unittests.js on lines 500..507

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

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

                it("should list all prop-name hints starting with 'border-' for style value context", function () {
                    // insert semicolon after previous rule to avoid incorrect tokenizing
                    testDocument.replaceRange(";", { line: 7, ch: 5 });
    
                    testEditor.setCursorPos({ line: 8, ch: 8 });
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 187..194
    src/extensions/default/CSSCodeHints/unittests.js on lines 196..203
    src/extensions/default/CSSCodeHints/unittests.js on lines 340..347
    src/extensions/default/CSSCodeHints/unittests.js on lines 349..356
    src/extensions/default/CSSCodeHints/unittests.js on lines 358..365
    src/extensions/default/CSSCodeHints/unittests.js on lines 491..498

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

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

                it("should list 11 value-name hints for region-break-before", function () {
                    testEditor.setCursorPos({ line: 6, ch: 23 });    // after region-break-before
                    var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                    verifyAttrHints(hintList, "always");  // first hint should be always
                    verifyAllValues(hintList, ["always", "auto", "avoid", "avoid-column", "avoid-page", "avoid-region", "column", "left", "page", "region", "right"]);
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 644..649

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

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

                it("should list 11 value-name hints for region-break-after", function () {
                    testEditor.setCursorPos({ line: 4, ch: 21 });    // after region-break-after
                    var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                    verifyAttrHints(hintList, "always");  // first hint should be always
                    verifyAllValues(hintList, ["always", "auto", "avoid", "avoid-column", "avoid-page", "avoid-region", "column", "left", "page", "region", "right"]);
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 658..663

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

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

                it("should list more than 2 value hints for flow-from", function () {
                    testEditor.setCursorPos({ line: 66, ch: 15 });    // after flow-from
                    var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                    verifyAttrHints(hintList, "edge-code_now_shipping");  // first hint should be edge-code_now_shipping
                    verifyAllValues(hintList, ["edge-code_now_shipping", "inherit", "jeff", "lim", "main", "none", "randy"]);
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 623..628

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

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

                it("should list 7 value-name hints for shape-inside", function () {
                    testEditor.setCursorPos({ line: 1, ch: 15 });    // after shape-inside
                    var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                    verifyAttrHints(hintList, "auto");  // first hint should be auto
                    verifyAllValues(hintList, ["auto", "circle()", "ellipse()", "inherit", "outside-shape", "polygon()", "rectangle()"]);
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 702..707

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

    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 verifyAllValues(hintList, values) {
                expect(hintList.length).toBe(values.length);
                expect(hintList.sort().toString()).toBe(values.sort().toString());
            }
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 110..113
    src/extensions/default/CSSPseudoSelectorHints/unittests.js on lines 116..119

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

    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

                it("should filter out color names appropriately", function () {
                    testEditor.setCursorPos({ line: 100, ch: 27 }); // after border-left-color
                    var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                    verifyAttrHints(hintList, "deeppink"); // first hint should be deeppink
                    verifyAllValues(hintList, ["deeppink", "deepskyblue"]);
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 637..642
    src/extensions/default/CSSCodeHints/unittests.js on lines 678..683

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

    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

                it("should list 2 value-name hints for region-fragment", function () {
                    testEditor.setCursorPos({ line: 3, ch: 18 });    // after region-fragment
                    var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                    verifyAttrHints(hintList, "auto");  // first hint should be auto
                    verifyAllValues(hintList, ["auto", "break"]);
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 678..683
    src/extensions/default/CSSCodeHints/unittests.js on lines 799..804

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

    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

                it("should list 2 value-name hints for flow-from", function () {
                    testEditor.setCursorPos({ line: 9, ch: 12 });    // after flow-from
                    var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                    verifyAttrHints(hintList, "inherit");  // first hint should be inherit
                    verifyAllValues(hintList, ["inherit", "none"]);
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 637..642
    src/extensions/default/CSSCodeHints/unittests.js on lines 799..804

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

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

                it("should list 1 value-name hint for flow-into", function () {
                    testEditor.setCursorPos({ line: 10, ch: 12 });    // after flow-into
                    var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                    verifyAttrHints(hintList, "none");  // first hint should be none
                    verifyAllValues(hintList, ["none"]);
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 1 hr to fix
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 154..159

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

    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 selectHint(provider, expectedHint, implicitChar) {
                var hintList = expectHints(provider, implicitChar);
                expect(hintList.indexOf(expectedHint)).not.toBe(-1);
                return provider.insertHint(expectedHint);
            }
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 2 other locations - About 1 hr to fix
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 84..88
    src/extensions/default/CSSPseudoSelectorHints/unittests.js on lines 90..94

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

    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 prop-name hints at end of property-value finished by ; for style value context", function () {
                    testEditor.setCursorPos({ line: 10, ch: 19 });    // after ;
                    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 167..171
    src/extensions/default/CSSCodeHints/unittests.js on lines 219..223
    src/extensions/default/CSSCodeHints/unittests.js on lines 471..475
    src/extensions/default/CSSCodeHints/unittests.js on lines 783..787
    src/extensions/default/HTMLCodeHints/unittests.js on lines 179..183

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

    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 prop-name hints at end of property-value finished by ;", function () {
                    testEditor.setCursorPos({ line: 10, ch: 19 });    // after ;
                    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 167..171
    src/extensions/default/CSSCodeHints/unittests.js on lines 471..475
    src/extensions/default/CSSCodeHints/unittests.js on lines 523..527
    src/extensions/default/CSSCodeHints/unittests.js on lines 783..787
    src/extensions/default/HTMLCodeHints/unittests.js on lines 179..183

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

    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 right after the open quote for style value context", function () {
                    testEditor.setCursorPos({ line: 4, ch: 12 });    // after "='"
                    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 167..171
    src/extensions/default/CSSCodeHints/unittests.js on lines 219..223
    src/extensions/default/CSSCodeHints/unittests.js on lines 523..527
    src/extensions/default/CSSCodeHints/unittests.js on lines 783..787
    src/extensions/default/HTMLCodeHints/unittests.js on lines 179..183

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

    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 color names for color", function () {
                    testEditor.setCursorPos({ line: 98, ch: 11 }); // after color
                    var hintList = expectHints(CSSCodeHints.cssPropHintProvider);
                    verifyAttrHints(hintList, "aliceblue"); // first hint should be aliceblue
                });
    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 167..171
    src/extensions/default/CSSCodeHints/unittests.js on lines 219..223
    src/extensions/default/CSSCodeHints/unittests.js on lines 471..475
    src/extensions/default/CSSCodeHints/unittests.js on lines 523..527
    src/extensions/default/HTMLCodeHints/unittests.js on lines 179..183

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

    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 right after curly bracket", function () {
                    testEditor.setCursorPos({ line: 4, ch: 11 });    // after {
                    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 219..223
    src/extensions/default/CSSCodeHints/unittests.js on lines 471..475
    src/extensions/default/CSSCodeHints/unittests.js on lines 523..527
    src/extensions/default/CSSCodeHints/unittests.js on lines 783..787
    src/extensions/default/HTMLCodeHints/unittests.js on lines 179..183

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

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

                beforeEach(function () {
                    // create dummy Document for the Editor
                    var mock = SpecRunnerUtils.createMockEditor(defaultContent, "css");
                    testEditor = mock.editor;
                    testDocument = mock.doc;
    Severity: Minor
    Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 55 mins to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 610..615

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

                beforeEach(function () {
                    // create dummy Document for the Editor
                    var mock = SpecRunnerUtils.createMockEditor(defaultContent, "css");
                    testEditor = mock.editor;
                    testDocument = mock.doc;
    Severity: Minor
    Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 55 mins to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 571..576

    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

                beforeEach(function () {
                    // create Editor instance (containing a CodeMirror instance)
                    var mock = SpecRunnerUtils.createMockEditor(defaultContent, "css");
                    testEditor = mock.editor;
                    testDocument = mock.doc;
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 7 other locations - About 50 mins to fix
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 187..192
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 208..213
    src/extensions/default/CSSCodeHints/unittests.js on lines 154..159
    src/extensions/default/CSSCodeHints/unittests.js on lines 327..332
    src/extensions/default/CSSCodeHints/unittests.js on lines 388..393
    src/extensions/default/CSSCodeHints/unittests.js on lines 458..463
    src/extensions/default/CSSCodeHints/unittests.js on lines 547..552

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

    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

                beforeEach(function () {
                    // create dummy Document for the Editor
                    var mock = SpecRunnerUtils.createMockEditor(defaultContent, "html");
                    testEditor = mock.editor;
                    testDocument = mock.doc;
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 7 other locations - About 50 mins to fix
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 187..192
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 208..213
    src/extensions/default/CSSCodeHints/unittests.js on lines 154..159
    src/extensions/default/CSSCodeHints/unittests.js on lines 246..251
    src/extensions/default/CSSCodeHints/unittests.js on lines 327..332
    src/extensions/default/CSSCodeHints/unittests.js on lines 458..463
    src/extensions/default/CSSCodeHints/unittests.js on lines 547..552

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

    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

                beforeEach(function () {
                    // create Editor instance (containing a CodeMirror instance)
                    var mock = SpecRunnerUtils.createMockEditor(defaultHTMLContent, "html");
                    testEditor = mock.editor;
                    testDocument = mock.doc;
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 7 other locations - About 50 mins to fix
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 187..192
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 208..213
    src/extensions/default/CSSCodeHints/unittests.js on lines 154..159
    src/extensions/default/CSSCodeHints/unittests.js on lines 246..251
    src/extensions/default/CSSCodeHints/unittests.js on lines 327..332
    src/extensions/default/CSSCodeHints/unittests.js on lines 388..393
    src/extensions/default/CSSCodeHints/unittests.js on lines 547..552

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

    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

                beforeEach(function () {
                    // create dummy Document for the Editor
                    var mock = SpecRunnerUtils.createMockEditor(defaultContent, "javascript");
                    testEditor = mock.editor;
                    testDocument = mock.doc;
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 7 other locations - About 50 mins to fix
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 187..192
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 208..213
    src/extensions/default/CSSCodeHints/unittests.js on lines 154..159
    src/extensions/default/CSSCodeHints/unittests.js on lines 246..251
    src/extensions/default/CSSCodeHints/unittests.js on lines 327..332
    src/extensions/default/CSSCodeHints/unittests.js on lines 388..393
    src/extensions/default/CSSCodeHints/unittests.js on lines 458..463

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

    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

                beforeEach(function () {
                    // create Editor instance (containing a CodeMirror instance)
                    var mock = SpecRunnerUtils.createMockEditor(defaultContent, "css");
                    testEditor = mock.editor;
                    testDocument = mock.doc;
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 7 other locations - About 50 mins to fix
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 187..192
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 208..213
    src/extensions/default/CSSCodeHints/unittests.js on lines 246..251
    src/extensions/default/CSSCodeHints/unittests.js on lines 327..332
    src/extensions/default/CSSCodeHints/unittests.js on lines 388..393
    src/extensions/default/CSSCodeHints/unittests.js on lines 458..463
    src/extensions/default/CSSCodeHints/unittests.js on lines 547..552

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

    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

                beforeEach(function () {
                    // create Editor instance (containing a CodeMirror instance)
                    var mock = SpecRunnerUtils.createMockEditor(defaultContent, "css");
                    testEditor = mock.editor;
                    testDocument = mock.doc;
    Severity: Major
    Found in src/extensions/default/CSSCodeHints/unittests.js and 7 other locations - About 50 mins to fix
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 187..192
    src/extensions/default/CSSAtRuleCodeHints/unittests.js on lines 208..213
    src/extensions/default/CSSCodeHints/unittests.js on lines 154..159
    src/extensions/default/CSSCodeHints/unittests.js on lines 246..251
    src/extensions/default/CSSCodeHints/unittests.js on lines 388..393
    src/extensions/default/CSSCodeHints/unittests.js on lines 458..463
    src/extensions/default/CSSCodeHints/unittests.js on lines 547..552

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

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

                it("should not trigger CSS property value hints with space key", function () {
                    testEditor.setCursorPos({ line: 28, ch: 21 });    // after flow-from
                    expectNoHints(CSSCodeHints.cssPropHintProvider, " ");
                });
    Severity: Minor
    Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 50 mins to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 856..859

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

                it("should not trigger CSS property name hints with space key", function () {
                    testEditor.setCursorPos({ line: 25, ch: 11 });    // after {
                    expectNoHints(CSSCodeHints.cssPropHintProvider, " ");
                });
    Severity: Minor
    Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 50 mins to fix
    src/extensions/default/CSSCodeHints/unittests.js on lines 861..864

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

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

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

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

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

                var defaultContent = "<html> \n" +
                                     "<head><style>.selector{display: none;}</style></head> \n" +
                                     "<body> <style> \n" +
                                     " body { \n" +
                                     "    background-color: red; \n" +
    Severity: Minor
    Found in src/extensions/default/CSSCodeHints/unittests.js and 1 other location - About 30 mins to fix
    src/extensions/default/PrefsCodeHints/unittests.js on lines 38..49

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

    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