adobe/brackets

View on GitHub

Showing 1,809 of 3,294 total issues

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

            it("should match bezier curve function with no optional whitespace", function () {
                match = TimingFunctionUtils.timingFunctionMatch("cubic-bezier(.1,.2,.3,.4)", false);
                expectArraysToBeEqual(match, ["cubic-bezier(.1,.2,.3,.4)", ".1", ".2", ".3", ".4"]);
                expect(match.originalString).toBeFalsy();
            });
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 105..109
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 110..114
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 115..119
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 120..124

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

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

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

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

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

Refactorings

Further Reading

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

                        resp.process.stdout.on('data', function (data) {
                            if (global.LanguageClientInfo.preferences.showServerLogsInConsole) {
                                console.info('[Server logs @ stdout] "%s"', String(data));
                            }
                        });
Severity: Major
Found in src/languageTools/LanguageClient/ServerUtils.js and 5 other locations - About 1 hr to fix
src/languageTools/LanguageClient/ServerUtils.js on lines 111..115
src/languageTools/LanguageClient/ServerUtils.js on lines 117..121
src/languageTools/LanguageClient/ServerUtils.js on lines 133..137
src/languageTools/LanguageClient/ServerUtils.js on lines 150..154
src/languageTools/LanguageClient/ServerUtils.js on lines 191..195

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

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 match bezier curve function with leading zeros", function () {
                match = TimingFunctionUtils.timingFunctionMatch("cubic-bezier(0.1, 0.2, 0.3, 0.4)", false);
                expectArraysToBeEqual(match, ["cubic-bezier(0.1, 0.2, 0.3, 0.4)", "0.1", "0.2", "0.3", "0.4"]);
                expect(match.originalString).toBeFalsy();
            });
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 105..109
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 110..114
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 115..119
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 125..129

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

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 list variables, function names and parameter names in other files", function () {
                testEditor.setCursorPos({ line: 6, ch: 0 });
                var hintObj = expectHints(JSCodeHints.jsHintProvider);
                hintsAbsent(hintObj, ["E1", "E2"]);
            });
Severity: Major
Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 503..507
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 521..525
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 539..543
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 581..585

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

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

                    } else if (c === "s" || c === "S") {
                        this._state = BEFORE_SPECIAL;
                        this._startSection();
                    } else if (!isLegalInTagName(c)) {
                        this._emitSpecialToken("error");
Severity: Major
Found in src/language/HTMLTokenizer.js and 4 other locations - About 1 hr to fix
src/language/HTMLTokenizer.js on lines 242..255
src/language/HTMLTokenizer.js on lines 297..306
src/language/HTMLTokenizer.js on lines 325..334
src/language/HTMLTokenizer.js on lines 339..348

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

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

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

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

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

Refactorings

Further Reading

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

                        resp.process.stderr.on('data', function (data) {
                            if (global.LanguageClientInfo.preferences.showServerLogsInConsole) {
                                console.error('[Server logs @ stderr] "%s"', String(data));
                            }
                        });
Severity: Major
Found in src/languageTools/LanguageClient/ServerUtils.js and 5 other locations - About 1 hr to fix
src/languageTools/LanguageClient/ServerUtils.js on lines 111..115
src/languageTools/LanguageClient/ServerUtils.js on lines 117..121
src/languageTools/LanguageClient/ServerUtils.js on lines 133..137
src/languageTools/LanguageClient/ServerUtils.js on lines 156..160
src/languageTools/LanguageClient/ServerUtils.js on lines 191..195

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

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 match bezier curve function in full line of shorthand css", function () {
                match = TimingFunctionUtils.timingFunctionMatch("    transition: top 100ms cubic-bezier(.37, .28, .83, .94) 0;", false);
                expectArraysToBeEqual(match, ["cubic-bezier(.37, .28, .83, .94)", ".37", ".28", ".83", ".94"]);
                expect(match.originalString).toBeFalsy();
            });
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 105..109
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 110..114
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 120..124
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 125..129

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

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

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

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

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

Refactorings

Further Reading

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

                        resp.process.stdout.on('data', function (data) {
                            if (global.LanguageClientInfo.preferences.showServerLogsInConsole) {
                                console.info('[Server logs @ stdout] "%s"', String(data));
                            }
                        });
Severity: Major
Found in src/languageTools/LanguageClient/ServerUtils.js and 5 other locations - About 1 hr to fix
src/languageTools/LanguageClient/ServerUtils.js on lines 111..115
src/languageTools/LanguageClient/ServerUtils.js on lines 133..137
src/languageTools/LanguageClient/ServerUtils.js on lines 150..154
src/languageTools/LanguageClient/ServerUtils.js on lines 156..160
src/languageTools/LanguageClient/ServerUtils.js on lines 191..195

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

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

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

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

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

Refactorings

Further Reading

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

                        resp.process.stderr.on('data', function (data) {
                            if (global.LanguageClientInfo.preferences.showServerLogsInConsole) {
                                console.error('[Server logs @ stderr] "%s"', String(data));
                            }
                        });
Severity: Major
Found in src/languageTools/LanguageClient/ServerUtils.js and 5 other locations - About 1 hr to fix
src/languageTools/LanguageClient/ServerUtils.js on lines 111..115
src/languageTools/LanguageClient/ServerUtils.js on lines 117..121
src/languageTools/LanguageClient/ServerUtils.js on lines 150..154
src/languageTools/LanguageClient/ServerUtils.js on lines 156..160
src/languageTools/LanguageClient/ServerUtils.js on lines 191..195

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

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 match bezier curve function with negative value", function () {
                match = TimingFunctionUtils.timingFunctionMatch("cubic-bezier(0, -.2, 1, 1.2)", false);
                expectArraysToBeEqual(match, ["cubic-bezier(0, -.2, 1, 1.2)", "0", "-.2", "1", "1.2"]);
                expect(match.originalString).toBeFalsy();
            });
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 110..114
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 115..119
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 120..124
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 125..129

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

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

            xit("should list explicitly defined globals from JSLint annotations", function () {
                testEditor.setCursorPos({ line: 6, ch: 0 });
                var hintObj = expectHints(JSCodeHints.jsHintProvider);
                hintsPresent(hintObj, ["brackets", "$"]);
            });
Severity: Major
Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 521..525
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 539..543
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 545..549
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 581..585

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

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

                } else if (c === "'") {
                    this._state = IN_ATTRIBUTE_VALUE_SINGLE_QUOTES;
                    this._startSection(1);
                } else if (!isLegalInUnquotedAttributeValue(c)) {
                    this._emitSpecialToken("error");
Severity: Major
Found in src/language/HTMLTokenizer.js and 4 other locations - About 1 hr to fix
src/language/HTMLTokenizer.js on lines 211..220
src/language/HTMLTokenizer.js on lines 242..255
src/language/HTMLTokenizer.js on lines 297..306
src/language/HTMLTokenizer.js on lines 325..334

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

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

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

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

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

Refactorings

Further Reading

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

            resp.process.stderr.on('data', function (data) {
                if (global.LanguageClientInfo.preferences.showServerLogsInConsole) {
                    console.error('[Server logs @ stderr] "%s"', String(data));
                }
            });
Severity: Major
Found in src/languageTools/LanguageClient/ServerUtils.js and 5 other locations - About 1 hr to fix
src/languageTools/LanguageClient/ServerUtils.js on lines 111..115
src/languageTools/LanguageClient/ServerUtils.js on lines 117..121
src/languageTools/LanguageClient/ServerUtils.js on lines 133..137
src/languageTools/LanguageClient/ServerUtils.js on lines 150..154
src/languageTools/LanguageClient/ServerUtils.js on lines 156..160

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

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 list explicitly defined globals from JSLint annotations in other files", function () {
                testEditor.setCursorPos({ line: 6, ch: 0 });
                var hintObj = expectHints(JSCodeHints.jsHintProvider);
                hintsAbsent(hintObj, ["crazyGlobal", "anotherCrazyGlobal"]);
            });
Severity: Major
Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 503..507
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 539..543
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 545..549
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 581..585

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

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 list identifier names that occur in other files", function () {
                testEditor.setCursorPos({ line: 16, ch: 0 });
                var hintObj = expectHints(JSCodeHints.jsHintProvider);
                hintsPresent(hintObj, ["D1", "D2"]);
            });
Severity: Major
Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 503..507
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 521..525
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 539..543
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 545..549

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

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

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

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

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

Refactorings

Further Reading

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

                        resp.process.stderr.on('data', function (data) {
                            if (global.LanguageClientInfo.preferences.showServerLogsInConsole) {
                                console.error('[Server logs @ stderr] "%s"', String(data));
                            }
                        });
Severity: Major
Found in src/languageTools/LanguageClient/ServerUtils.js and 5 other locations - About 1 hr to fix
src/languageTools/LanguageClient/ServerUtils.js on lines 117..121
src/languageTools/LanguageClient/ServerUtils.js on lines 133..137
src/languageTools/LanguageClient/ServerUtils.js on lines 150..154
src/languageTools/LanguageClient/ServerUtils.js on lines 156..160
src/languageTools/LanguageClient/ServerUtils.js on lines 191..195

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

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 match bezier curve function in full line of longhand css", function () {
                match = TimingFunctionUtils.timingFunctionMatch("    transition-timing-function: cubic-bezier(.37, .28, .83, .94);", false);
                expectArraysToBeEqual(match, ["cubic-bezier(.37, .28, .83, .94)", ".37", ".28", ".83", ".94"]);
                expect(match.originalString).toBeFalsy();
            });
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 105..109
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 115..119
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 120..124
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 125..129

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

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 list variables, function names and parameter names out of scope", function () {
                testEditor.setCursorPos({ line: 6, ch: 0 });
                var hintObj = expectHints(JSCodeHints.jsHintProvider);
                hintsAbsent(hintObj, ["paramB2", "paramB1"]);
            });
Severity: Major
Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 4 other locations - About 1 hr to fix
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 503..507
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 521..525
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 545..549
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 581..585

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

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

                } else if (c === "/") {
                    this._emitSpecialToken("selfclosingtag", this._index + 2, _clonePos(this._indexPos, 2));
                    this._state = AFTER_SELFCLOSE_SLASH;
                } else if (!isLegalInAttributeName(c)) {
                    this._emitSpecialToken("error");
Severity: Major
Found in src/language/HTMLTokenizer.js and 4 other locations - About 1 hr to fix
src/language/HTMLTokenizer.js on lines 211..220
src/language/HTMLTokenizer.js on lines 242..255
src/language/HTMLTokenizer.js on lines 325..334
src/language/HTMLTokenizer.js on lines 339..348

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

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

                } else if (c === "/" || c === ">") {
                    this._state = BEFORE_ATTRIBUTE_NAME;
                    continue;
                } else if (!isLegalInAttributeName(c)) {
                    this._emitSpecialToken("error");
Severity: Major
Found in src/language/HTMLTokenizer.js and 4 other locations - About 1 hr to fix
src/language/HTMLTokenizer.js on lines 211..220
src/language/HTMLTokenizer.js on lines 242..255
src/language/HTMLTokenizer.js on lines 297..306
src/language/HTMLTokenizer.js on lines 339..348

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

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language