XingFramework/Relayer

View on GitHub

Showing 201 of 591 total issues

File relayer.es5.js has 4827 lines of code (exceeds 250 allowed). Consider refactoring.
Open

define('relayer/jsonpath',[], function() {

  if (!Array.isArray) {
    Array.isArray = function(vArg) {
      return Object.prototype.toString.call(vArg) === "[object Array]";
Severity: Major
Found in dist/relayer.es5.js - About 1 wk to fix

    Function jsonPath has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
    Open

    function jsonPath(obj, expr, arg) {
      var P = {
        resultType: arg && arg.resultType || "value",
        flatten: arg && arg.flatten || false,
        wrap: arg && arg.hasOwnProperty("wrap") ? arg.wrap : true,
    Severity: Minor
    Found in dist/cjs/relayer/jsonpath.js - About 2 days 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 jsonPath has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
    Open

    export default function jsonPath(obj, expr, arg) {
       var P = {
          resultType: arg && arg.resultType || "value",
          flatten: arg && arg.flatten || false,
          wrap: (arg && arg.hasOwnProperty('wrap')) ? arg.wrap : true,
    Severity: Minor
    Found in dist/relayer/jsonpath.js - About 2 days 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 jsonPath has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
    Open

    export default function jsonPath(obj, expr, arg) {
       var P = {
          resultType: arg && arg.resultType || "value",
          flatten: arg && arg.flatten || false,
          wrap: (arg && arg.hasOwnProperty('wrap')) ? arg.wrap : true,
    Severity: Minor
    Found in src/relayer/jsonpath.js - About 2 days 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 RelatedResourceDecorator has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
    Open

    var RelatedResourceDecorator = (function (_ResourceDecorator) {
      function RelatedResourceDecorator(promiseEndpointFactory, relationshipUtilities, name, relationship) {
        _classCallCheck(this, RelatedResourceDecorator);
    
        _get(Object.getPrototypeOf(RelatedResourceDecorator.prototype), "constructor", this).call(this, name);
    Severity: Minor
    Found in dist/cjs/relayer/decorators/RelatedResourceDecorator.js - About 1 day 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 jsonPath has 185 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function jsonPath(obj, expr, arg) {
        var P = {
          resultType: arg && arg.resultType || "value",
          flatten: arg && arg.flatten || false,
          wrap: (arg && arg.hasOwnProperty('wrap')) ? arg.wrap : true,
    Severity: Major
    Found in dist/relayer.es5.js - About 7 hrs to fix

      Function jsonPath has 175 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function jsonPath(obj, expr, arg) {
        var P = {
          resultType: arg && arg.resultType || "value",
          flatten: arg && arg.flatten || false,
          wrap: arg && arg.hasOwnProperty("wrap") ? arg.wrap : true,
      Severity: Major
      Found in dist/cjs/relayer/jsonpath.js - About 7 hrs to fix

        Function Resource has 168 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var Resource = (function (_DataWrapper) {
          function Resource(responseData) {
            _classCallCheck(this, Resource);
        
            _get(Object.getPrototypeOf(Resource.prototype), "constructor", this).call(this, responseData);
        Severity: Major
        Found in dist/cjs/relayer/Resource.js - About 6 hrs to fix

          Function jsonPath has 165 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function jsonPath(obj, expr, arg) {
             var P = {
                resultType: arg && arg.resultType || "value",
                flatten: arg && arg.flatten || false,
                wrap: (arg && arg.hasOwnProperty('wrap')) ? arg.wrap : true,
          Severity: Major
          Found in dist/relayer/jsonpath.js - About 6 hrs to fix

            Function jsonPath has 165 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export default function jsonPath(obj, expr, arg) {
               var P = {
                  resultType: arg && arg.resultType || "value",
                  flatten: arg && arg.flatten || false,
                  wrap: (arg && arg.hasOwnProperty('wrap')) ? arg.wrap : true,
            Severity: Major
            Found in src/relayer/jsonpath.js - About 6 hrs to fix

              Function DataWrapper has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
              Open

              var DataWrapper = (function () {
                function DataWrapper(response) {
                  _classCallCheck(this, DataWrapper);
              
                  this._response = response;
              Severity: Minor
              Found in dist/cjs/relayer/DataWrapper.js - About 5 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 RelatedResourceDecorator has 124 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var RelatedResourceDecorator = (function (_ResourceDecorator) {
                function RelatedResourceDecorator(promiseEndpointFactory, relationshipUtilities, name, relationship) {
                  _classCallCheck(this, RelatedResourceDecorator);
              
                  _get(Object.getPrototypeOf(RelatedResourceDecorator.prototype), "constructor", this).call(this, name);
              Severity: Major
              Found in dist/cjs/relayer/decorators/RelatedResourceDecorator.js - About 4 hrs to fix

                Function Resource has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
                Open

                var Resource = (function (_DataWrapper) {
                  function Resource(responseData) {
                    _classCallCheck(this, Resource);
                
                    _get(Object.getPrototypeOf(Resource.prototype), "constructor", this).call(this, responseData);
                Severity: Minor
                Found in dist/cjs/relayer/Resource.js - About 4 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 ListRelationshipDescription has 120 lines of code (exceeds 25 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);

                  Function DataWrapper has 116 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var DataWrapper = (function () {
                    function DataWrapper(response) {
                      _classCallCheck(this, DataWrapper);
                  
                      this._response = response;
                  Severity: Major
                  Found in dist/cjs/relayer/DataWrapper.js - About 4 hrs to fix

                    Function resourceFn has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                    Open

                      get resourceFn(){
                        if(!this._resourceFn) {
                          var name = this.name;
                          var relationship = this.relationship;
                          var promiseEndpointFactory = this.promiseEndpointFactory;
                    Severity: Minor
                    Found in dist/relayer/decorators/RelatedResourceDecorator.js - About 4 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 resourceFn has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
                    Open

                      get resourceFn(){
                        if(!this._resourceFn) {
                          var name = this.name;
                          var relationship = this.relationship;
                          var promiseEndpointFactory = this.promiseEndpointFactory;
                    Severity: Minor
                    Found in src/relayer/decorators/RelatedResourceDecorator.js - About 4 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 ResourceDescription has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var ResourceDescription = (function () {
                      function ResourceDescription(jsonPropertyDecoratorFactory, relatedResourceDecoratorFactory, singleRelationshipDescriptionFactory, manyRelationshipDescriptionFactory, listRelationshipDescriptionFactory, mapRelationshipDescriptionFactory, inflector) {
                        _classCallCheck(this, ResourceDescription);
                    
                        this.jsonPropertyDecoratorFactory = jsonPropertyDecoratorFactory;
                    Severity: Major
                    Found in dist/cjs/relayer/ResourceDescription.js - About 3 hrs to fix

                      Function ListResourceMapper has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var ListResourceMapper = (function (_ResourceMapper) {
                        function ListResourceMapper(templatedUrlFromUrlFactory, resourceBuilderFactory, primaryResourceBuilderFactory, primaryResourceTransformerFactory, manyResourceMapperFactory, temporaryTemplatedUrlFactory, transport, response, relationshipDescription, endpoint) {
                          var useErrors = arguments[10] === undefined ? false : arguments[10];
                      
                          _classCallCheck(this, ListResourceMapper);
                      Severity: Major
                      Found in dist/cjs/relayer/mappers/ListResourceMapper.js - About 3 hrs to fix

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

                        var Transport = (function () {
                          function Transport(urlHelper, $http) {
                            _classCallCheck(this, Transport);
                        
                            this.http = $http;
                        Severity: Major
                        Found in dist/cjs/relayer/Transport.js - About 3 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language