abelevtsov/XrmSoapSDK

View on GitHub

Showing 52 of 101 total issues

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

    this.RetrieveAttributeRequest = (function(base) {
        const template = compile([
                `<request i:type='a:RetrieveAttributeRequest' xmlns:a='${contractsXrmNs}'>`,
                  `<a:Parameters xmlns:b='${genericNs}'>`,
                    "<a:KeyValuePairOfstringanyType>",
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 day to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1709..1765

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

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

    this.RetrieveEntityRequest = (function(base) {
        const template = compile([
                `<request i:type='a:RetrieveEntityRequest' xmlns:a='${contractsXrmNs}'>`,
                  `<a:Parameters xmlns:b='${genericNs}'>`,
                    "<a:KeyValuePairOfstringanyType>",
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 1 day to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 1767..1823

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

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

        queryByAttributeAsyncExample = function() {
            var query = new QueryByAttribute("contact", ["firstname"], ["test"], new ColumnSet("fullname"));
            orgService.retrieveMultipleAsync(query).then(function(contacts) {
                for (let i = 0, l = contacts.length; i < l; i++) {
                    console.log(`FullName: ${contacts[i].getAttributeValue("fullname")}`);
Severity: Major
Found in src/Xrm.Soap.Sdk/js/examples.js and 1 other location - About 1 day to fix
src/Xrm.Soap.Sdk/js/examples.js on lines 84..98

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

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

        queryByAttributeExample = function() {
            var query = new QueryByAttribute("contact", ["firstname"], ["test"], new ColumnSet("fullname"));
            orgService.retrieveMultiple(query).then(function(contacts) {
                for (let i = 0, l = contacts.length; i < l; i++) {
                    console.log(`FullName: ${contacts[i].getAttributeValue("fullname")}`);
Severity: Major
Found in src/Xrm.Soap.Sdk/js/examples.js and 1 other location - About 1 day to fix
src/Xrm.Soap.Sdk/js/examples.js on lines 100..114

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

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

        fetchExample = function() {
            /* eslint-disable */
            const fetchXml = [
                "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>",
                    "<entity name='contact'>",
Severity: Major
Found in src/Xrm.Soap.Sdk/js/examples.js and 1 other location - About 5 hrs to fix
src/Xrm.Soap.Sdk/js/examples.js on lines 54..82

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

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

        fetchAsyncExample = function() {
            /* eslint-disable */
            const fetchXml = [
                "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>",
                    "<entity name='contact'>",
Severity: Major
Found in src/Xrm.Soap.Sdk/js/examples.js and 1 other location - About 5 hrs to fix
src/Xrm.Soap.Sdk/js/examples.js on lines 25..52

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

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

                parameters: _.map(parameters, function(p) {
                    // ToDo: extract this method to common usage
                    const typed = p.value ? p.value.hasOwnProperty("type") : false;
                    return parameterTemplate({
                        name: p.name,
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 4 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2012..2020

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

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

                parameters: _.map(parameters, function(p) {
                    // ToDo: extract this method to common usage
                    const typed = p.value ? p.value.hasOwnProperty("type") : false;
                    return parameterTemplate({
                        name: p.name,
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 4 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2066..2074

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

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

        ctor.prototype.addOrders = function(/* order list */) {
            if (arguments && arguments.length) {
                let counter = this.orders.length;
                for (var i = 0, l = arguments.length; i < l; i++) {
                    const order = arguments[i];
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 4 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 954..962
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 981..989

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

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

        ctor.prototype.addOrders = function(/* order list */) {
            if (arguments && arguments.length) {
                let counter = this.orders.length;
                for (var i = 0, l = arguments.length; i < l; i++) {
                    const order = arguments[i];
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 4 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 839..847
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 981..989

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

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

        ctor.prototype.addLinks = function(/* linkEntity list */) {
            if (arguments && arguments.length) {
                let counter = this.linkEntities.length;
                for (var i = 0, l = arguments.length; i < l; i++) {
                    const linkEntity = arguments[i];
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 2 other locations - About 4 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 839..847
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 954..962

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

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

            return orgService.execute(request, async).then(function(result) {
                const $response = $(result).find("ExecuteResult").eq(0);
                return crmXmlDecode($response.text());
            }).catch(function(err) {
                notify(`Ошибка:\n${err && err.description ? err.description : err}`);
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 4 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2807..2812

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

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

            return orgService.execute(request, async).then(function(result) {
                const $response = $(result).find("ExecuteResult").eq(0);
                return crmXmlDecode($response.text());
            }).catch(function(err) {
                notify(`Ошибка:\n${err && err.description ? err.description : err}`);
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 4 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2837..2842

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

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

    this.setAllRecommendedAttributesToRequired = function() {
        const attributes = xrmPage.data.entity.attributes.get();
        for (let name in attributes) {
            if (attributes.hasOwnProperty(name)) {
                const attribute = attributes[name];
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.common.js and 1 other location - About 3 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.common.js on lines 257..267

Duplicated Code

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

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

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

Tuning

This issue has a mass of 110.

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

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

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

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

Refactorings

Further Reading

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

    this.setAllMandatoryAttributesToNone = function() {
        const attributes = xrmPage.data.entity.attributes.get();
        for (let name in attributes) {
            if (attributes.hasOwnProperty(name)) {
                const attribute = attributes[name];
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.common.js and 1 other location - About 3 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.common.js on lines 245..255

Duplicated Code

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

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

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

Tuning

This issue has a mass of 110.

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

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

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

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

Refactorings

Further Reading

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

                if (columnSet && $.isArray(columnSet)) {
                    columnSet = new self.ColumnSet(columnSet);
                    columnSet = columnSet.serialize(false, true);
                } else if (columnSet && columnSet instanceof self.ColumnSet) {
                    columnSet = columnSet.serialize(false, true);
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 3 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2415..2422

Duplicated Code

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

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

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

Tuning

This issue has a mass of 110.

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

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

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

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

Refactorings

Further Reading

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

            if (columnSet && $.isArray(columnSet)) {
                columnSet = new self.ColumnSet(columnSet);
                columnSet = columnSet.serialize(false, true);
            } else if (columnSet && columnSet instanceof self.ColumnSet) {
                columnSet = columnSet.serialize(false, true);
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 3 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2194..2201

Duplicated Code

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

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

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

Tuning

This issue has a mass of 110.

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

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

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

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

Refactorings

Further Reading

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

        orgService.prototype.update = function(entity, async) {
            return execute(entity.serialize(), "Update", async).then(function(resultXml) {
                return resultXml ? $(resultXml).find("UpdateResponse").text() : null;
            });
        };
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 2 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2352..2356

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

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

        orgService.prototype.create = function(entity, async) {
            return execute(entity.serialize(), "Create", async).then(function(resultXml) {
                return resultXml ? $(resultXml).find("CreateResult").text() : null;
            });
        };
Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 2 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 2371..2375

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

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

        ctor.prototype.pageInfo = function(/* value */) {
            if (arguments && arguments.length === 1 && arguments[0] instanceof self.PageInfo) {
                this.pageInfo = arguments[0];
            }

Severity: Major
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js and 1 other location - About 2 hrs to fix
src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js on lines 865..871

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

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