adobe/brackets

View on GitHub

Showing 1,809 of 3,294 total issues

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

            it("should show function type code hint for function in script file inside html file", function () {
                var start = { line: 22, ch: 17 };

                testEditor.setCursorPos(start);
                runs(function () {
Severity: Major
Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 908..914
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1355..1362

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

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

                runs(function () {
                    expect(requestId).toBeGreaterThan(-1);
                    expect(location.pathname).toBe("/index.txt");
                    expect(text).toBe("This is a file in folder 1.");

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

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

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

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

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

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

Refactorings

Further Reading

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

            it("should list function type defined from .prototype", function () {
                var start = { line: 59, ch: 10 };
                testEditor.setCursorPos(start);
                runs(function () {
                    expectParameterHint([{name: "a4", type: "Number"}, {name: "b4", type: "Number"}], 0);
Severity: Major
Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1346..1353
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1355..1362

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

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 show function type code hint for function in another script file inside html file", function () {
                var start = { line: 23, ch: 17 };

                testEditor.setCursorPos(start);
                runs(function () {
Severity: Major
Found in src/extensions/default/JavaScriptCodeHints/unittests.js and 2 other locations - About 2 hrs to fix
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 908..914
src/extensions/default/JavaScriptCodeHints/unittests.js on lines 1346..1353

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

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

        } else {
            bracketsTheme = ExtensionManager.extensions[installedTheme];
            if (bracketsTheme && bracketsTheme.installInfo && bracketsTheme.installInfo.locationType === ExtensionManager.LOCATION_USER && bracketsTheme.registryInfo) {
                result.resolve(installedTheme);
            } else {
Severity: Major
Found in src/extensions/default/HealthData/HealthDataUtils.js and 1 other location - About 2 hrs to fix
src/extensions/default/HealthData/HealthDataUtils.js on lines 84..91

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

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

            ExtensionManager.downloadRegistry().done(function () {
                bracketsTheme = ExtensionManager.extensions[installedTheme];
                if (bracketsTheme && bracketsTheme.installInfo && bracketsTheme.installInfo.locationType === ExtensionManager.LOCATION_USER && bracketsTheme.registryInfo) {
                    result.resolve(installedTheme);
                } else {
Severity: Major
Found in src/extensions/default/HealthData/HealthDataUtils.js and 1 other location - About 2 hrs to fix
src/extensions/default/HealthData/HealthDataUtils.js on lines 95..102

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

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 makeColorEditor(cursor) {
            runs(function () {
                var promise = provider(testEditor, cursor);
                if (promise) {
                    promise.done(function (inlineResult) {
Severity: Major
Found in src/extensions/default/InlineColorEditor/unittests.js and 1 other location - About 2 hrs to fix
src/extensions/default/InlineTimingFunctionEditor/unittests.js on lines 49..60

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

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 makeTimingFunctionEditor(cursor) {
            runs(function () {
                var promise = provider(testEditor, cursor);
                if (promise) {
                    promise.done(function (inlineResult) {
src/extensions/default/InlineColorEditor/unittests.js on lines 73..84

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

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 function in declaration in strict mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("transition-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 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 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-values for 'display' after colon", function () {
                // insert semicolon after previous rule to avoid incorrect tokenizing
                testDocument.replaceRange(";", { line: 12, ch: 5 });

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

            it("should match ease-in function in declaration in strict mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("transition-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 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 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 linear function in declaration in strict mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("transition-timing-function: linear;", false);
                expect(match.length).toEqual(1);
                expect(match[0]).toEqual("linear");
                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 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 linear function value in lax mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("linear", true);
                expect(match.length).toEqual(1);
                expect(match[0]).toEqual("linear");
                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 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-out function value in lax mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("ease-out", true);
                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 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 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 function in declaration in strict mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("transition-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 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 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 'border-' ", function () {
                // insert semicolon after previous rule to avoid incorrect tokenizing
                testDocument.replaceRange(";", { line: 7, ch: 5 });

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

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 null;
            }
Severity: Major
Found in src/language/JSONUtils.js and 1 other location - About 2 hrs to fix
src/language/XMLUtils.js on lines 257..262

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-start function value in lax mode", function () {
                match = TimingFunctionUtils.timingFunctionMatch("step-start", true);
                expect(match.length).toEqual(1);
                expect(match[0]).toEqual("step-start");
                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 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' ", function () {
                // insert semicolon after previous rule to avoid incorrect tokenizing
                testDocument.replaceRange(";", { line: 6, ch: 2 });

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 85.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language