XingFramework/Relayer

View on GitHub

Showing 201 of 591 total issues

Function get has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Minor
Found in dist/cjs/relayer/initializers/ListRelationshipInitializer.js - About 1 hr 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 get has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

var _get = function get(_x3, _x4, _x5) { var _again = true; _function: while (_again) { var object = _x3, property = _x4, receiver = _x5; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x3 = parent; _x4 = property; _x5 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Minor
Found in dist/cjs/relayer/mappers/ResourceMapper.js - About 1 hr 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 get has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Minor
Found in dist/cjs/relayer/serializers/ListResourceSerializer.js - About 1 hr 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 get has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Minor
Found in dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js - About 1 hr 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 get has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Minor
Found in dist/cjs/relayer/transformers/CreateResourceTransformer.js - About 1 hr 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 get has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

var _get = function get(_x3, _x4, _x5) { var _again = true; _function: while (_again) { var object = _x3, property = _x4, receiver = _x5; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x3 = parent; _x4 = property; _x5 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Minor
Found in dist/cjs/relayer/TemplatedUrl.js - About 1 hr 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 mapNestedRelationships has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  mapNestedRelationships() {

    // add mappings for list resource
    super.mapNestedRelationships();

Severity: Minor
Found in dist/relayer/mappers/ListResourceMapper.js - About 1 hr to fix

    Function SingleRelationshipDescription has 12 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      function SingleRelationshipDescription(relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, primaryResourceTransformerFactory, embeddedRelationshipTransformerFactory, resolvedEndpointFactory, loadedDataEndpointFactory, templatedUrlFactory, name, ResourceClass, initialValues) {

      Function SingleRelationshipDescription has 12 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        var SingleRelationshipDescription = function SingleRelationshipDescription(relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, primaryResourceTransformerFactory, embeddedRelationshipTransformerFactory, resolvedEndpointFactory, loadedDataEndpointFactory, templatedUrlFactory, name, ResourceClass, initialValues) {
      Severity: Major
      Found in dist/relayer.es5.js - About 1 hr to fix

        Function Mapper has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var Mapper = (function () {
          function Mapper(transport, response, relationshipDescription) {
            var useErrors = arguments[3] === undefined ? false : arguments[3];
        
            _classCallCheck(this, Mapper);
        Severity: Minor
        Found in dist/cjs/relayer/mappers/Mapper.js - About 1 hr to fix

          Function pathSet has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Function MetaMap has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var MetaMap = (function () {
              function MetaMap() {
                _classCallCheck(this, MetaMap);
            
                this._metadataMap = new Map();
            Severity: Minor
            Found in dist/cjs/relayer/MetaMap.js - About 1 hr to fix

              Function PrimaryResourceTransformer has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var PrimaryResourceTransformer = (function (_ResourceTransformer) {
                function PrimaryResourceTransformer(relationshipDescription) {
                  _classCallCheck(this, PrimaryResourceTransformer);
              
                  _get(Object.getPrototypeOf(PrimaryResourceTransformer.prototype), "constructor", this).call(this);
              Severity: Minor
              Found in dist/cjs/relayer/transformers/PrimaryResourceTransformer.js - About 1 hr to fix

                Function pathClear has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    value: function pathClear(jsonpath) {
                      var path = (0, _jsonpathJs2["default"])(this._response, jsonpath, { wrap: true, resultType: "path" });
                      if (path && path.length === 0) {
                        return;
                      }
                Severity: Minor
                Found in dist/cjs/relayer/DataWrapper.js - About 1 hr to fix

                  Function _resourceFn has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          this._resourceFn = function (uriParams) {
                            var _this = this;
                  
                            var recursiveCall = arguments[1] === undefined ? false : arguments[1];
                  
                  
                  Severity: Minor
                  Found in dist/cjs/relayer/decorators/RelatedResourceDecorator.js - About 1 hr to fix

                    Function _resourceFn has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            this._resourceFn = function(uriParams) {
                              var recursiveCall = arguments[1] !== (void 0) ? arguments[1] : false;
                              var $__10 = this;
                              if (relationship.async && this.isPersisted) {
                                var endpoint;
                    Severity: Minor
                    Found in dist/relayer.es5.js - About 1 hr to fix

                      Function setupProperty has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        ($traceurRuntime.createClass)(PropertiesBuilder, {setupProperty: function(key, properties) {
                            properties[STRING_PREFIX + key] = "@" + this._bindObj[key];
                            properties[BIND_PREFIX + key] = "=?bind" + this._bindObj[key][0].toUpperCase() + this._bindObj[key].slice(1);
                            Object.defineProperty(this._component.prototype, BIND_PREFIX + key, {
                              enumerable: true,
                      Severity: Minor
                      Found in dist/relayer.es5.js - About 1 hr to fix

                        Function MultipleRelationshipDescription has 10 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          function MultipleRelationshipDescription(relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, embeddedRelationshipTransformerFactory, singleFromManyTransformerFactory, loadedDataEndpointFactory, name, ResourceClass, initialValues) {

                          Function TemplatedUrl has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                          var TemplatedUrl = (function () {
                            function TemplatedUrl(uriTemplate) {
                              var uriParams = arguments[1] === undefined ? {} : arguments[1];
                          
                              _classCallCheck(this, TemplatedUrl);
                          Severity: Minor
                          Found in dist/cjs/relayer/TemplatedUrl.js - About 1 hr 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 ListResourceMapper has 10 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            function ListResourceMapper(templatedUrlFromUrlFactory, resourceBuilderFactory, primaryResourceBuilderFactory, primaryResourceTransformerFactory, manyResourceMapperFactory, temporaryTemplatedUrlFactory, transport, response, relationshipDescription, endpoint) {
                          Severity: Major
                          Found in dist/cjs/relayer/mappers/ListResourceMapper.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language