abelevtsov/XrmSoapSDK

View on GitHub

Showing 101 of 101 total issues

Function PageInfo has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    this.PageInfo = (function() {
        const template = compile([
            "<a:PageInfo>",
                "<a:Count><%= count %></a:Count>",
                "<a:PageNumber><%= pageNumber %></a:PageNumber>",
Severity: Minor
Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

    Function isMetadataArray has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            isMetadataArray = (function() {
                var arrayElements = [
                        "Attributes",
                        "ManyToManyRelationships",
                        "ManyToOneRelationships",
    Severity: Minor
    Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 1 hr to fix

      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

                                      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

      Avoid deeply nested control flow statements.
      Open

                                          for (var y = 0; y < childNodes.length; y++) {
                                              var itemNodes = childNodes[y].childNodes[0].childNodes;
                                              for (var z = 0; z < itemNodes.length; z++) {
                                                  if ($(itemNodes[z].childNodes[0]).text() !== "partyid") {
                                                      continue;
      Severity: Major
      Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        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: Major
        Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                          if (attributes[l].nodeName === "i:type") {
                                              sType = ($(attributes[l]).val() || "")
                                                  .replace("c:", "")
                                                  .replace("a:", "");
                                              break;
          Severity: Major
          Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 45 mins to fix

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

            Function ctor has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    const ctor = function(linkFromEntityName, linkToEntityName, linkFromAttributeName, linkToAttributeName, joinOperator) {
            Severity: Minor
            Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 35 mins to fix

              Function callAction has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      crmProvider.prototype.callAction = function(actionName, entityName, entityId, parameters, async) {
              Severity: Minor
              Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 35 mins to fix

                Function setState has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        crmProvider.prototype.setState = function(entityName, entityId, state, status, async) {
                Severity: Minor
                Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 35 mins to fix

                  Function load has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      this.load = function(executionContext, requirejsResourceName, mainResourceName, etn, parameters) {
                  Severity: Minor
                  Found in src/Xrm.Soap.Sdk/js/xrm.app.js - About 35 mins to fix

                    Function ctor has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                            const ctor = function(entityName, attributes, values, columnSet, topCount) {
                    Severity: Minor
                    Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 35 mins to fix

                      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

                      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

                      Avoid too many return statements within this function.
                      Open

                                      return null;
                      Severity: Major
                      Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                            return parseXml(xmlToString(response));
                        Severity: Major
                        Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return c;
                          Severity: Major
                          Found in src/Xrm.Soap.Sdk/js/xrm.soap.sdk.js - About 30 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language