XingFramework/Relayer

View on GitHub

Showing 201 of 591 total issues

Function JsonPropertyDecorator has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var JsonPropertyDecorator = (function (_ResourceDecorator) {
  function JsonPropertyDecorator(loadedDataEndpointFactory, embeddedPropertyTransformerFactory, promiseEndpointFactory, name, path, value, options) {
    _classCallCheck(this, JsonPropertyDecorator);

    _get(Object.getPrototypeOf(JsonPropertyDecorator.prototype), "constructor", this).call(this, name);
Severity: Major
Found in dist/cjs/relayer/decorators/JsonPropertyDecorator.js - About 3 hrs to fix

    Function ListRelationshipDescription has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

    var ListRelationshipDescription = (function (_RelationshipDescription) {
      function ListRelationshipDescription(relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, singleRelationshipDescriptionFactory, ListResource, primaryResourceTransformerFactory, embeddedRelationshipTransformerFactory, individualFromListTransformerFactory, createResourceTransformerFactory, resolvedEndpointFactory, loadedDataEndpointFactory, templatedUrlFromUrlFactory, templatedUrlFactory, name, ResourceClass, initialValues) {
        _classCallCheck(this, ListRelationshipDescription);
    
        _get(Object.getPrototypeOf(ListRelationshipDescription.prototype), "constructor", this).call(this, relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, name, ResourceClass, initialValues);

    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 ResolvedEndpoint has 66 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var ResolvedEndpoint = (function (_Endpoint) {
      function ResolvedEndpoint(Promise, transport, templatedUrl) {
        var _this = this;
    
        var resourceTransformers = arguments[3] === undefined ? [] : arguments[3];
    Severity: Major
    Found in dist/cjs/relayer/endpoints/ResolvedEndpoint.js - About 2 hrs to fix

      Resource has 23 functions (exceeds 20 allowed). Consider refactoring.
      Open

      export default class Resource extends DataWrapper {
        constructor(responseData) {
          super(responseData);
          if (!responseData) {
            this.emptyData();
      Severity: Minor
      Found in src/relayer/Resource.js - About 2 hrs to fix

        Resource has 23 functions (exceeds 20 allowed). Consider refactoring.
        Open

        export default class Resource extends DataWrapper {
          constructor(responseData) {
            super(responseData);
            if (!responseData) {
              this.emptyData();
        Severity: Minor
        Found in dist/relayer/Resource.js - About 2 hrs to fix

          Function ResourceMapper has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

          var ResourceMapper = (function (_Mapper) {
            function ResourceMapper(templatedUrlFromUrlFactory, resourceBuilderFactory, primaryResourceBuilderFactory, primaryResourceTransformerFactory, transport, response, relationshipDescription) {
              var endpoint = arguments[7] === undefined ? null : arguments[7];
              var useErrors = arguments[8] === undefined ? false : arguments[8];
          
          
          Severity: Minor
          Found in dist/cjs/relayer/mappers/ResourceMapper.js - About 2 hrs 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 TemplatedUrl has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var TemplatedUrl = (function () {
            function TemplatedUrl(uriTemplate) {
              var uriParams = arguments[1] === undefined ? {} : arguments[1];
          
              _classCallCheck(this, TemplatedUrl);
          Severity: Major
          Found in dist/cjs/relayer/TemplatedUrl.js - About 2 hrs to fix

            Function Endpoint has 59 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var Endpoint = (function () {
              function Endpoint() {
                _classCallCheck(this, Endpoint);
              }
            
            
            Severity: Major
            Found in dist/cjs/relayer/endpoints/Endpoint.js - About 2 hrs to fix

              Function mapNestedRelationships has 57 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  value: function mapNestedRelationships() {
                    var _this = this;
              
                    // add mappings for list resource
                    _get(Object.getPrototypeOf(ListResourceMapper.prototype), "mapNestedRelationships", this).call(this);
              Severity: Major
              Found in dist/cjs/relayer/mappers/ListResourceMapper.js - About 2 hrs to fix

                Function mapNestedRelationships has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    mapNestedRelationships: function() {
                      var $__16 = this;
                      $traceurRuntime.superGet(this, $ListResourceMapper.prototype, "mapNestedRelationships").call(this);
                      this.resource = this.mapped;
                      var manyResourceMapper = this.manyResourceMapperFactory(this.transport, this.resource.pathGet("$.data"), this.relationshipDescription);
                Severity: Major
                Found in dist/relayer.es5.js - About 2 hrs to fix

                  Function Endpoint has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var Endpoint = (function () {
                    function Endpoint() {
                      _classCallCheck(this, Endpoint);
                    }
                  
                  
                  Severity: Minor
                  Found in dist/cjs/relayer/endpoints/Endpoint.js - About 2 hrs 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 trace has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        trace: function(expr, val, path) {
                          function addRet(elems) {
                            ret = ret.concat(elems);
                          }
                          if (!expr.length) {
                  Severity: Major
                  Found in dist/relayer.es5.js - About 2 hrs to fix

                    Function ListRelationshipDescription has 17 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      function ListRelationshipDescription(relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, singleRelationshipDescriptionFactory, ListResource, primaryResourceTransformerFactory, embeddedRelationshipTransformerFactory, individualFromListTransformerFactory, createResourceTransformerFactory, resolvedEndpointFactory, loadedDataEndpointFactory, templatedUrlFromUrlFactory, templatedUrlFactory, name, ResourceClass, initialValues) {

                      Function ListRelationshipDescription has 17 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        var ListRelationshipDescription = function ListRelationshipDescription(relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, singleRelationshipDescriptionFactory, ListResource, primaryResourceTransformerFactory, embeddedRelationshipTransformerFactory, individualFromListTransformerFactory, createResourceTransformerFactory, resolvedEndpointFactory, loadedDataEndpointFactory, templatedUrlFromUrlFactory, templatedUrlFactory, name, ResourceClass, initialValues) {
                      Severity: Major
                      Found in dist/relayer.es5.js - About 2 hrs to fix

                        Function RelationshipUtilities has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                        Open

                        var RelationshipUtilities = (function () {
                          function RelationshipUtilities() {
                            _classCallCheck(this, RelationshipUtilities);
                          }
                        
                        
                        Severity: Minor
                        Found in dist/cjs/relayer/RelationshipUtilities.js - About 2 hrs 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 ResourceBuilder has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                        Open

                        var ResourceBuilder = (function () {
                          function ResourceBuilder(templatedUrlFromUrlFactory, resolvedEndpointFactory, throwErrorTransformerFactory, createResourceTransformerFactory, transport, response, primaryResourceTransformer, ResourceClass, relationshipDescription) {
                            _classCallCheck(this, ResourceBuilder);
                        
                            this.transport = transport;
                        Severity: Minor
                        Found in dist/cjs/relayer/ResourceBuilder.js - About 2 hrs 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 UrlHelper has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        var UrlHelper = (function () {
                          function UrlHelper(baseUrl) {
                            _classCallCheck(this, UrlHelper);
                        
                            if (this.isFullUrl(baseUrl)) {
                        Severity: Major
                        Found in dist/cjs/relayer/UrlHelper.js - About 2 hrs to fix

                          Function IndividualFromListTransformer has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

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

                            Function ResourceMapper has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            var ResourceMapper = (function (_Mapper) {
                              function ResourceMapper(templatedUrlFromUrlFactory, resourceBuilderFactory, primaryResourceBuilderFactory, primaryResourceTransformerFactory, transport, response, relationshipDescription) {
                                var endpoint = arguments[7] === undefined ? null : arguments[7];
                                var useErrors = arguments[8] === undefined ? false : arguments[8];
                            
                            
                            Severity: Minor
                            Found in dist/cjs/relayer/mappers/ResourceMapper.js - About 1 hr to fix

                              Function ResourceBuilder has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              var ResourceBuilder = (function () {
                                function ResourceBuilder(templatedUrlFromUrlFactory, resolvedEndpointFactory, throwErrorTransformerFactory, createResourceTransformerFactory, transport, response, primaryResourceTransformer, ResourceClass, relationshipDescription) {
                                  _classCallCheck(this, ResourceBuilder);
                              
                                  this.transport = transport;
                              Severity: Minor
                              Found in dist/cjs/relayer/ResourceBuilder.js - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language