abelevtsov/XrmSoapSDK

View on GitHub

Showing 52 of 101 total issues

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

    this.Money = (function() {
        const ctor = function(value) {
            this.value = value;
            this.type = "Money";
        };
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 4 other locations - About 1 hr to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1459..1466
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1534..1541
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1596..1603
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1605..1612

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

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

    this.StatusCode = (function() {
        const ctor = function(value) {
            this.value = value;
            this.type = "int";
        };
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 4 other locations - About 1 hr to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1450..1457
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1459..1466
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1534..1541
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1596..1603

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

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

    this.Decimal = (function() {
        const ctor = function(value) {
            this.value = value;
            this.type = "decimal";
        };
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 4 other locations - About 1 hr to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1450..1457
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1534..1541
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1596..1603
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1605..1612

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

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

    this.EntityCollection = (function() {
        const entityCollection = function(value) {
            this.value = value;
            this.type = "EntityCollection";
        };
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 4 other locations - About 1 hr to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1450..1457
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1459..1466
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1596..1603
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1605..1612

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

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

    this.StateCode = (function() {
        const ctor = function(value) {
            this.value = value;
            this.type = "int";
        };
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 4 other locations - About 1 hr to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1450..1457
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1459..1466
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1534..1541
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1605..1612

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

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

                                case "OptionSetValue":
                                    obj[sKey] = new self.OptionSetValue(parseInt($(attr.childNodes[k].childNodes[1]).text()));
                                    break;
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1352..1354

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

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

                                case "Money":
                                    obj[sKey] = new self.Money(parseFloat($(attr.childNodes[k].childNodes[1]).text()));
                                    break;
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 hr to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1325..1327

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

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

        ctor.prototype.toLookupValue = function() {
            return [{
                id: this.getIdValue(),
                name: this.getName(),
                entityType: this.getLogicalName()
Severity: Minor
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 40 mins to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1132..1138

Duplicated Code

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

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

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

Tuning

This issue has a mass of 48.

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

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

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

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

Refactorings

Further Reading

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

            toLookupValue: function() {
                return [{
                    id: this.getIdValue(),
                    name: this.getName(),
                    entityType: this.logicalName()
Severity: Minor
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 40 mins to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1573..1579

Duplicated Code

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

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

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

Tuning

This issue has a mass of 48.

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

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

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

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

Refactorings

Further Reading

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

                                    if (entCv.type === "int") {
                                        entCv.value = parseInt($(attr.childNodes[k].childNodes[1]).text());
                                    } else if (entCv.type === "decimal" || entCv.type === "double") {
                                        entCv.value = parseFloat($(attr.childNodes[k].childNodes[1]).text());
                                    } else if (entCv.type === "dateTime") {
Severity: Minor
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 35 mins to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1363..1382
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1365..1382

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

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

                                    } else if (entCv.type === "dateTime") {
                                        entCv.value = stringToDate($(attr.childNodes[k].childNodes[1]).text());
                                    } else if (entCv.type === "boolean") {
                                        entCv.value = ($(attr.childNodes[k].childNodes[1]).text() === "false") ? false : true;
                                    } else if (entCv.type === "AliasedValue") {
Severity: Minor
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 35 mins to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1361..1382
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1363..1382

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

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

                                    } else if (entCv.type === "decimal" || entCv.type === "double") {
                                        entCv.value = parseFloat($(attr.childNodes[k].childNodes[1]).text());
                                    } else if (entCv.type === "dateTime") {
                                        entCv.value = stringToDate($(attr.childNodes[k].childNodes[1]).text());
                                    } else if (entCv.type === "boolean") {
Severity: Minor
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 35 mins to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1361..1382
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1365..1382

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

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