adobe/brackets

View on GitHub

Showing 1,809 of 3,294 total issues

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

            it("should list all prop-values for 'display' after colon and whitespace", function () {
                // insert semicolon after previous rule to avoid incorrect tokenizing
                testDocument.replaceRange(";", { line: 12, ch: 5 });

                testEditor.setCursorPos({ line: 13, ch: 10 });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 187..194
src/extensions/default/CSSCodeHints/unittests.js on lines 196..203
src/extensions/default/CSSCodeHints/unittests.js on lines 340..347
src/extensions/default/CSSCodeHints/unittests.js on lines 358..365
src/extensions/default/CSSCodeHints/unittests.js on lines 491..498
src/extensions/default/CSSCodeHints/unittests.js on lines 500..507

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

            it("should match ease-out animation function in declaration in strict mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("animation-timing-function: ease-out;", false);
                expect(match.length).toEqual(1);
                expect(match[0]).toEqual("ease-out");
                expect(match.originalString).toBeFalsy();
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

            it("should match ease function in declaration in strict mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("transition-timing-function: ease;", false);
                expect(match.length).toEqual(1);
                expect(match[0]).toEqual("ease");
                expect(match.originalString).toBeFalsy();
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

            it("should match ease-in function value in lax mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("ease-in", true);
                expect(match.length).toEqual(1);
                expect(match[0]).toEqual("ease-in");
                expect(match.originalString).toBeFalsy();
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

            it("should match ease-in animation function in declaration in strict mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("animation-timing-function: ease-in;", false);
                expect(match.length).toEqual(1);
                expect(match[0]).toEqual("ease-in");
                expect(match.originalString).toBeFalsy();
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

            it("should match ease-in-out animation function in declaration in strict mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("animation-timing-function: ease-in-out;", false);
                expect(match.length).toEqual(1);
                expect(match[0]).toEqual("ease-in-out");
                expect(match.originalString).toBeFalsy();
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

            it("should match step-end function in declaration in strict mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("transition-timing-function: step-end;", false);
                expect(match.length).toEqual(1);
                expect(match[0]).toEqual("step-end");
                expect(match.originalString).toBeFalsy();
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

            it("should list all prop-name hints starting with 'border-' for style value context", function () {
                // insert semicolon after previous rule to avoid incorrect tokenizing
                testDocument.replaceRange(";", { line: 7, ch: 5 });

                testEditor.setCursorPos({ line: 8, ch: 8 });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 187..194
src/extensions/default/CSSCodeHints/unittests.js on lines 196..203
src/extensions/default/CSSCodeHints/unittests.js on lines 340..347
src/extensions/default/CSSCodeHints/unittests.js on lines 349..356
src/extensions/default/CSSCodeHints/unittests.js on lines 358..365
src/extensions/default/CSSCodeHints/unittests.js on lines 491..498

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

            it("should match ease animation function in declaration in strict mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("animation-timing-function: ease;", false);
                expect(match.length).toEqual(1);
                expect(match[0]).toEqual("ease");
                expect(match.originalString).toBeFalsy();
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 186..191
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

            it("should match ease function value in lax mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("ease", true);
                expect(match.length).toEqual(1);
                expect(match[0]).toEqual("ease");
                expect(match.originalString).toBeFalsy();
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 143..148
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 149..154
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 155..160
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 161..166
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 168..173
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 174..179
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 180..185
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 192..197
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 198..203
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 204..209
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 210..215
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 216..221
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 354..359
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 360..365

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

            it("should list all prop-name hints starting with 'bord' for style value context", function () {
                // insert semicolon after previous rule to avoid incorrect tokenizing
                testDocument.replaceRange(";", { line: 6, ch: 2 });

                testEditor.setCursorPos({ line: 7, ch: 5 });
Severity: Major
Found in src/extensions/default/CSSCodeHints/unittests.js and 6 other locations - About 2 hrs to fix
src/extensions/default/CSSCodeHints/unittests.js on lines 187..194
src/extensions/default/CSSCodeHints/unittests.js on lines 196..203
src/extensions/default/CSSCodeHints/unittests.js on lines 340..347
src/extensions/default/CSSCodeHints/unittests.js on lines 349..356
src/extensions/default/CSSCodeHints/unittests.js on lines 358..365
src/extensions/default/CSSCodeHints/unittests.js on lines 500..507

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

            if (ctx.token.type === "string" &&
                    /^['"]$/.test(ctx.token.string.substr(-1, 1)) &&
                    ctx.token.string.length !== 1 &&
                    ctx.token.end === pos.ch) {
                return _createTagInfo();
Severity: Major
Found in src/language/XMLUtils.js and 1 other location - About 2 hrs to fix
src/language/JSONUtils.js on lines 232..235

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

        _.forEach(menuItemMap, function (value, key) {
            if (_.startsWith(key, id)) {
                if (value.isDivider) {
                    menu.removeMenuDivider(key);
                } else {
Severity: Major
Found in src/command/Menus.js and 1 other location - About 2 hrs to fix
src/command/Menus.js on lines 871..880

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

            it("should NOT hint after closing braces", function () {
                // After "javascript": { [rules] }
                testEditor.setCursorPos({line: 13, ch: 9});
                expectNoHints(PrefsCodeHints.hintProvider);

Severity: Major
Found in src/extensions/default/PrefsCodeHints/unittests.js and 1 other location - About 2 hrs to fix
src/extensions/default/PrefsCodeHints/unittests.js on lines 468..476

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

    LanguageClientWrapper.prototype.addOnCustomEventHandler = function (eventName, handler) {
        if (validateHandler(handler)) {
            if (!this._onEventHandlers[eventName]) {
                this._onEventHandlers[eventName] = [];
            }
Severity: Major
Found in src/languageTools/LanguageClientWrapper.js and 1 other location - About 2 hrs to fix
src/languageTools/LanguageClient/LanguageClient.js on lines 194..202

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

    hide: function( speed ) {
        if ( standardSpeed( speed ) ) {
            return this._hide.apply( this, arguments );
        } else {
            var args = _normalizeArguments.apply( this, arguments );
src/extensions/default/JavaScriptQuickEdit/unittest-files/jquery-ui/ui/jquery.effects.core.js on lines 637..645

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

  function makeMap(size, root, ownerID, hash) {
    var map = Object.create(MapPrototype);
    map.size = size;
    map._root = root;
    map.__ownerID = ownerID;
Severity: Major
Found in src/thirdparty/immutable.js and 1 other location - About 2 hrs to fix
src/thirdparty/immutable.js on lines 4223..4231

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

        _.forEach(menuItemMap, function (value, key) {
            if (_.startsWith(key, subMenuID)) {
                if (value.isDivider) {
                    subMenu.removeMenuDivider(key);
                } else {
Severity: Major
Found in src/command/Menus.js and 1 other location - About 2 hrs to fix
src/command/Menus.js on lines 1130..1139

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language