adobe/brackets

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

Summary

Maintainability
F
2 wks
Test Coverage

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

/*
 * Copyright (c) 2015 - 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: Minor
Found in src/extensions/default/SVGCodeHints/unittests.js - About 7 hrs to fix

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

                it("should insert if query is empty", function () {
                    // After <defs+space inside <g>
                    testDocument.replaceRange("<defs ", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 14});
                    selectHint(SVGCodeHints.hintProvider, "alignment-baseline");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 2 other locations - About 5 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 538..547
    src/extensions/default/SVGCodeHints/unittests.js on lines 549..558

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

    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 if query is complete", function () {
                    // After <defs clip-path inside <g>
                    testDocument.replaceRange("<defs clip-path", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 23});
                    selectHint(SVGCodeHints.hintProvider, "clip-path");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 2 other locations - About 5 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 527..536
    src/extensions/default/SVGCodeHints/unittests.js on lines 538..547

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

    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 if query is one character long", function () {
                    // After <defs b inside <g>
                    testDocument.replaceRange("<defs b", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 15});
                    selectHint(SVGCodeHints.hintProvider, "baseline-shift");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 2 other locations - About 5 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 527..536
    src/extensions/default/SVGCodeHints/unittests.js on lines 549..558

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

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

                it("should insert value in the middle in a multiple options attribute", function () {
                    // Between matrix() and rotate() in "matrix()  rotate()"
                    testDocument.replaceRange("<rect transform=\"matrix()  rotate()\"", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 34});
                    selectHint(SVGCodeHints.hintProvider, "scale()");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
    src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681

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

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

                it("should insert if we are in the end of value after =\"", function () {
                    // Before last " in clip-path="inherit" inside <g>
                    testDocument.replaceRange("<defs clip-path=\"inherit\"", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 32});
                    selectHint(SVGCodeHints.hintProvider, "inherit");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
    src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

                it("should insert if =' is typed after an attribute", function () {
                    // After =' inside <g>
                    testDocument.replaceRange("<defs clip-path='", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 25});
                    selectHint(SVGCodeHints.hintProvider, "inherit");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
    src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

                it("should insert if we are in middle of query after =\"", function () {
                    // After clip-path="inhe inside <g>
                    testDocument.replaceRange("<defs clip-path=\"inhe", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 29});
                    selectHint(SVGCodeHints.hintProvider, "inherit");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
    src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

                it("should insert value to left in a multiple options attribute", function () {
                    // Between "" in transform="" inside <g>
                    testDocument.replaceRange("<rect transform=\"\"", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 25});
                    selectHint(SVGCodeHints.hintProvider, "matrix()");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
    src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

                it("should insert value to the right in a multiple options attribute", function () {
                    // After "matrix() " inside <g>
                    testDocument.replaceRange("<rect transform=\"matrix() \"", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 34});
                    selectHint(SVGCodeHints.hintProvider, "rotate()");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
    src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

                it("should insert if first character is typed after ='", function () {
                    // After clip-path='i inside <g>
                    testDocument.replaceRange("<defs clip-path='i", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 26});
                    selectHint(SVGCodeHints.hintProvider, "inherit");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

                it("should insert if =\" is typed after an attribute", function () {
                    // After clip-path=" inside <g>
                    testDocument.replaceRange("<defs clip-path=\"", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 25});
                    selectHint(SVGCodeHints.hintProvider, "inherit");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
    src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

                it("should insert if first character is typed after =\"", function () {
                    // After clip-path="i inside <g>
                    testDocument.replaceRange("<defs clip-path=\"i", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 26});
                    selectHint(SVGCodeHints.hintProvider, "inherit");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

                it("should insert if we are in the end of value after ='", function () {
                    // Before last ' in clip-path='inherit' inside <g>
                    testDocument.replaceRange("<defs clip-path='inherit'", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 32});
                    selectHint(SVGCodeHints.hintProvider, "inherit");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
    src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

                it("should insert if = is typed after an attribute", function () {
                    // after clip-path= inside <g>
                    testDocument.replaceRange("<defs clip-path=", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 24});
                    selectHint(SVGCodeHints.hintProvider, "inherit");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
    src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 633..641
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

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

                it("should insert if we are in middle of query after ='", function () {
                    // After clip-path='inhe inside <g>
                    testDocument.replaceRange("<defs clip-path='inhe", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 29});
                    selectHint(SVGCodeHints.hintProvider, "inherit");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 11 other locations - About 4 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 573..581
    src/extensions/default/SVGCodeHints/unittests.js on lines 583..591
    src/extensions/default/SVGCodeHints/unittests.js on lines 593..601
    src/extensions/default/SVGCodeHints/unittests.js on lines 603..611
    src/extensions/default/SVGCodeHints/unittests.js on lines 613..621
    src/extensions/default/SVGCodeHints/unittests.js on lines 623..631
    src/extensions/default/SVGCodeHints/unittests.js on lines 643..651
    src/extensions/default/SVGCodeHints/unittests.js on lines 653..661
    src/extensions/default/SVGCodeHints/unittests.js on lines 663..671
    src/extensions/default/SVGCodeHints/unittests.js on lines 673..681
    src/extensions/default/SVGCodeHints/unittests.js on lines 683..691

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

    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 if query is complete", function () {
                    // After <defs inside <g>
                    testDocument.replaceRange("<defs", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 13});
                    selectHint(SVGCodeHints.hintProvider, "defs");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 2 other locations - About 3 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 498..505
    src/extensions/default/SVGCodeHints/unittests.js on lines 507..514

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

    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 if query is empty", function () {
                    // After < inside <g>
                    testDocument.replaceRange("<", { line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 9});
                    selectHint(SVGCodeHints.hintProvider, "a");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 2 other locations - About 3 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 507..514
    src/extensions/default/SVGCodeHints/unittests.js on lines 516..523

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

    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 if query is one character long", function () {
                    // After <d inside <g>
                    testDocument.replaceRange("<d", {line: 7, ch: 8});
                    testEditor.setCursorPos({line: 7, ch: 10});
                    selectHint(SVGCodeHints.hintProvider, "defs");
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 2 other locations - About 3 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 498..505
    src/extensions/default/SVGCodeHints/unittests.js on lines 516..523

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

    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

            function expectCursorAt(pos) {
                var selection = testEditor.getSelection();
                expect(fixPos(selection.start)).toEqual(fixPos(selection.end));
                expect(fixPos(selection.start)).toEqual(fixPos(pos));
            }
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/PrefsCodeHints/unittests.js on lines 150..154

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

    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 hint in middle of value in muliple options with empty query", function () {
                    // Between xMinYMid and meet
                    testDocument.replaceRange(" ", {line: 2, ch: 59});
                    testEditor.setCursorPos({ line: 2, ch: 60});
                    var hintLint = expectHints(SVGCodeHints.hintProvider);
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 421..427

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

    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 hint in middle of value in multiple options with a query", function () {
                    // Between xMinYMid and meet
                    testDocument.replaceRange(" sli", {line: 2, ch: 59});
                    testEditor.setCursorPos({line: 2, ch: 63});
                    var hintLint = expectHints(SVGCodeHints.hintProvider);
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 1 other location - About 2 hrs to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 413..419

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

    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

            function expectHints(provider) {
                expect(provider.hasHints(testEditor, null)).toBe(true);
                var hintObj = provider.getHints();
                expect(hintObj).toBeTruthy();
                return hintObj.hints;
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 1 other location - About 1 hr to fix
    src/extensions/default/PrefsCodeHints/unittests.js on lines 96..101

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 72.

    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

            function expectTokenAt(pos, string, type) {
                var token = testEditor._codeMirror.getTokenAt(pos);
                expect(token.string).toBe(string);
                expect(token.type).toBe(type);
            }
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 1 other location - About 1 hr to fix
    src/extensions/default/PrefsCodeHints/unittests.js on lines 135..139

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

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

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

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

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

    Refactorings

    Further Reading

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

                it("should NOT hint if we have whitespace between attribute and =", function () {
                    // Before = in <rect width =
                    testDocument.replaceRange("  ", {line: 4, ch: 15});
                    testEditor.setCursorPos({line: 4, ch: 16});
                    expectNoHints(SVGCodeHints.hintProvider);
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 4 other locations - About 1 hr to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 191..196
    src/extensions/default/SVGCodeHints/unittests.js on lines 198..203
    src/extensions/default/SVGCodeHints/unittests.js on lines 305..310
    src/extensions/default/SVGCodeHints/unittests.js on lines 435..440

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

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

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

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

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

    Refactorings

    Further Reading

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

                it("should NOT hint in the middle of invalid tag", function () {
                    // After < rec in < rect
                    testDocument.replaceRange(" ", {line: 4, ch: 5});
                    testEditor.setCursorPos({line: 4, ch: 9});
                    expectNoHints(SVGCodeHints.hintProvider);
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 4 other locations - About 1 hr to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 191..196
    src/extensions/default/SVGCodeHints/unittests.js on lines 298..303
    src/extensions/default/SVGCodeHints/unittests.js on lines 305..310
    src/extensions/default/SVGCodeHints/unittests.js on lines 435..440

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

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

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

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

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

    Refactorings

    Further Reading

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

                it("should NOT hint in an invalid tag", function () {
                    // After fill=" in < rect
                    testDocument.replaceRange(" ", {line: 4, ch: 5});
                    testEditor.setCursorPos({line: 4, ch: 42});
                    expectNoHints(SVGCodeHints.hintProvider);
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 4 other locations - About 1 hr to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 191..196
    src/extensions/default/SVGCodeHints/unittests.js on lines 198..203
    src/extensions/default/SVGCodeHints/unittests.js on lines 298..303
    src/extensions/default/SVGCodeHints/unittests.js on lines 305..310

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

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

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

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

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

    Refactorings

    Further Reading

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

                it("should NOT hint after first character in an invalid tag", function () {
                    // After < r in first < rect
                    testDocument.replaceRange(" ", {line: 4, ch: 5});
                    testEditor.setCursorPos({line: 4, ch: 7});
                    expectNoHints(SVGCodeHints.hintProvider);
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 4 other locations - About 1 hr to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 198..203
    src/extensions/default/SVGCodeHints/unittests.js on lines 298..303
    src/extensions/default/SVGCodeHints/unittests.js on lines 305..310
    src/extensions/default/SVGCodeHints/unittests.js on lines 435..440

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

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

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

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

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

    Refactorings

    Further Reading

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

                it("should NOT hint in case there is a space between < and tag name", function () {
                    // After space in < rect
                    testDocument.replaceRange(" ", {line: 4, ch: 5});
                    testEditor.setCursorPos({line: 4, ch: 11});
                    expectNoHints(SVGCodeHints.hintProvider);
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 4 other locations - About 1 hr to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 191..196
    src/extensions/default/SVGCodeHints/unittests.js on lines 198..203
    src/extensions/default/SVGCodeHints/unittests.js on lines 298..303
    src/extensions/default/SVGCodeHints/unittests.js on lines 435..440

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

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 60.

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

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

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

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

    Refactorings

    Further Reading

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

            function verifyHintsExcluded(hintList, unexpectedHint) {
                var hints = extractHintList(hintList);
                expect(hints.indexOf(unexpectedHint)).toBe(-1);
            }
    Severity: Minor
    Found in src/extensions/default/SVGCodeHints/unittests.js and 1 other location - About 45 mins to fix
    src/extensions/default/PrefsCodeHints/unittests.js on lines 120..123

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

                it("should NOT hint at the end of closing tag", function () {
                    // Before > in </title>
                    testEditor.setCursorPos({line: 3, ch: 41});
                    expectNoHints(SVGCodeHints.hintProvider);
                });
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 3 other locations - About 40 mins to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 158..162
    src/extensions/default/SVGCodeHints/unittests.js on lines 164..168
    src/extensions/default/SVGCodeHints/unittests.js on lines 429..433

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

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

                it("should NOT hint in closing tag after </", function () {
                    // After </ in </title>
                    testEditor.setCursorPos({line: 3, ch: 36});
                    expectNoHints(SVGCodeHints.hintProvider);
                });
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 3 other locations - About 40 mins to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 164..168
    src/extensions/default/SVGCodeHints/unittests.js on lines 170..174
    src/extensions/default/SVGCodeHints/unittests.js on lines 429..433

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

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

                it("should NOT hint in case cursor is out of right quote", function () {
                    // After meet"
                    testEditor.setCursorPos({line: 2, ch: 65});
                    expectNoHints(SVGCodeHints.hintProvider);
                });
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 3 other locations - About 40 mins to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 158..162
    src/extensions/default/SVGCodeHints/unittests.js on lines 164..168
    src/extensions/default/SVGCodeHints/unittests.js on lines 170..174

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

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

                it("should NOT hint in the middle of closing tag", function () {
                    // After </tit in </title>
                    testEditor.setCursorPos({line: 3, ch: 39});
                    expectNoHints(SVGCodeHints.hintProvider);
                });
    Severity: Major
    Found in src/extensions/default/SVGCodeHints/unittests.js and 3 other locations - About 40 mins to fix
    src/extensions/default/SVGCodeHints/unittests.js on lines 158..162
    src/extensions/default/SVGCodeHints/unittests.js on lines 170..174
    src/extensions/default/SVGCodeHints/unittests.js on lines 429..433

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

    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