XingFramework/Relayer

View on GitHub

Showing 201 of 591 total issues

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

var EmbeddedPropertyTransformer = (function (_ResourceTransformer) {
  function EmbeddedPropertyTransformer(path) {
    _classCallCheck(this, EmbeddedPropertyTransformer);

    _get(Object.getPrototypeOf(EmbeddedPropertyTransformer.prototype), "constructor", this).call(this);
Severity: Minor
Found in dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js - About 1 hr to fix

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

        get endpointFn() {
          if (!this._endpointFn) {
            var name = this.name;
            var description = this.relationship.ResourceClass.resourceDescription;
            var relationship = this.relationship;
    Severity: Minor
    Found in dist/relayer.es5.js - About 1 hr to fix

      Function Injector has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      var Injector = (function () {
        function Injector() {
          _classCallCheck(this, Injector);
      
          this._instantiations = [];
      Severity: Minor
      Found in dist/cjs/relayer/injector.js - About 55 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function pathSet has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

        pathSet(jsonpath, value){
          var path = jsonPath(this._response, jsonpath, {wrap: true, resultType: "path"});
          if (path && path.length > 0) {
            path = path[0];
            if(path[0] !== "$"){
      Severity: Minor
      Found in dist/relayer/DataWrapper.js - About 55 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function pathSet has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

        pathSet(jsonpath, value){
          var path = jsonPath(this._response, jsonpath, {wrap: true, resultType: "path"});
          if (path && path.length > 0) {
            path = path[0];
            if(path[0] !== "$"){
      Severity: Minor
      Found in src/relayer/DataWrapper.js - About 55 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function RelationshipDescription has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        function RelationshipDescription(relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, name, ResourceClass, initialValues) {
      Severity: Major
      Found in dist/cjs/relayer/relationshipDescriptions/RelationshipDescription.js - About 50 mins to fix

        Function ResourceDescription has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          function ResourceDescription(jsonPropertyDecoratorFactory, relatedResourceDecoratorFactory, singleRelationshipDescriptionFactory, manyRelationshipDescriptionFactory, listRelationshipDescriptionFactory, mapRelationshipDescriptionFactory, inflector) {
        Severity: Major
        Found in dist/cjs/relayer/ResourceDescription.js - About 50 mins to fix

          Function JsonPropertyDecorator has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            function JsonPropertyDecorator(loadedDataEndpointFactory, embeddedPropertyTransformerFactory, promiseEndpointFactory, name, path, value, options) {
          Severity: Major
          Found in dist/cjs/relayer/decorators/JsonPropertyDecorator.js - About 50 mins to fix

            Function ResourceMapper has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              function ResourceMapper(templatedUrlFromUrlFactory, resourceBuilderFactory, primaryResourceBuilderFactory, primaryResourceTransformerFactory, transport, response, relationshipDescription) {
            Severity: Major
            Found in dist/cjs/relayer/mappers/ResourceMapper.js - About 50 mins to fix

              Function ResourceDescription has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                var ResourceDescription = function ResourceDescription(jsonPropertyDecoratorFactory, relatedResourceDecoratorFactory, singleRelationshipDescriptionFactory, manyRelationshipDescriptionFactory, listRelationshipDescriptionFactory, mapRelationshipDescriptionFactory, inflector) {
              Severity: Major
              Found in dist/relayer.es5.js - About 50 mins to fix

                Function ResourceMapper has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  var ResourceMapper = function ResourceMapper(templatedUrlFromUrlFactory, resourceBuilderFactory, primaryResourceBuilderFactory, primaryResourceTransformerFactory, transport, response, relationshipDescription) {
                Severity: Major
                Found in dist/relayer.es5.js - About 50 mins to fix

                  Function RelationshipDescription has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    var RelationshipDescription = function RelationshipDescription(relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, name, ResourceClass, initialValues) {
                  Severity: Major
                  Found in dist/relayer.es5.js - About 50 mins to fix

                    Function JsonPropertyDecorator has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      var JsonPropertyDecorator = function JsonPropertyDecorator(loadedDataEndpointFactory, embeddedPropertyTransformerFactory, promiseEndpointFactory, name, path, value, options) {
                    Severity: Major
                    Found in dist/relayer.es5.js - About 50 mins to fix

                      Function Transport has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                      var Transport = (function () {
                        function Transport(urlHelper, $http) {
                          _classCallCheck(this, Transport);
                      
                          this.http = $http;
                      Severity: Minor
                      Found in dist/cjs/relayer/Transport.js - About 45 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function build has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                        build(uriTemplate = null) {
                          var resource = new this.ResourceClass(this.response);
                          if (resource.pathGet("$.links.self")) {
                            if (uriTemplate) {
                              resource.templatedUrl = this.templatedUrlFromUrlFactory(uriTemplate, resource.pathGet("$.links.self"));
                      Severity: Minor
                      Found in dist/relayer/ResourceBuilder.js - About 45 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

                      Function build has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                        build(uriTemplate = null) {
                          var resource = new this.ResourceClass(this.response);
                          if (resource.pathGet("$.links.self")) {
                            if (uriTemplate) {
                              resource.templatedUrl = this.templatedUrlFromUrlFactory(uriTemplate, resource.pathGet("$.links.self"));
                      Severity: Minor
                      Found in src/relayer/ResourceBuilder.js - About 45 mins to fix

                      Cognitive Complexity

                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                      A method's cognitive complexity is based on a few simple rules:

                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                      • Code is considered more complex for each "break in the linear flow of the code"
                      • Code is considered more complex when "flow breaking structures are nested"

                      Further reading

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

                          walk: function walk(loc, expr, val, path, f) {
                      Severity: Minor
                      Found in dist/cjs/relayer/jsonpath.js - About 35 mins to fix

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

                              walk: function(loc, expr, val, path, f) {
                        Severity: Minor
                        Found in dist/relayer/jsonpath.js - About 35 mins to fix

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

                                walk: function(loc, expr, val, path, f) {
                          Severity: Minor
                          Found in dist/relayer.es5.js - About 35 mins to fix

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

                                  walk: function(loc, expr, val, path, f) {
                            Severity: Minor
                            Found in src/relayer/jsonpath.js - About 35 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language