konsultaner/jsonOdm

View on GitHub

Showing 175 of 272 total issues

File geo.js has 976 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"use strict";

// for code climate recognition
if (typeof jsonOdm === "undefined") {
    var jsonOdm;
Severity: Major
Found in src/geo.js - About 2 days to fix

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

    jsonOdm.Collection.decorate = function (collection) {
        var decorate = function (collection) {
            if (jsonOdm.util.isArray(collection)) {
                /**
                 * // TODO needs a proper has many functionality that aromatically gathers the child elements
    Severity: Minor
    Found in src/collection.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 within has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring.
    Open

    jsonOdm.Geo.MultiPoint.within = function (multiPoint, geometry) {
        var i, j, k, found;
        if (!multiPoint.coordinates || !jsonOdm.util.isArray(multiPoint.coordinates)) {
            return false;
        }
    Severity: Minor
    Found in src/geo.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

    File query.js has 593 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    "use strict";
    
    // for code climate recognition
    if (typeof jsonOdm === "undefined") {
        var jsonOdm;
    Severity: Major
    Found in src/query.js - About 1 day to fix

      Function intersects has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
      Open

      jsonOdm.Geo.MultiPoint.intersects = function (multiPoint, geometry) {
          var i, j, k;
          if (!multiPoint.coordinates || !jsonOdm.util.isArray(multiPoint.coordinates)) {
              return false;
          }
      Severity: Minor
      Found in src/geo.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 within has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
      Open

      jsonOdm.Geo.MultiLineString.within = function (multiLineString, geometry) {
          var i, j, k, found;
          if (!multiLineString.coordinates || !jsonOdm.util.isArray(multiLineString.coordinates)) {
              return false;
          }
      Severity: Minor
      Found in src/geo.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 intersects has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
      Open

      jsonOdm.Geo.MultiLineString.intersects = function (multiLineString, geometry) {
          var i, j, k;
          if (!multiLineString.coordinates || !jsonOdm.util.isArray(multiLineString.coordinates)) {
              return false;
          }
      Severity: Minor
      Found in src/geo.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 within has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
      Open

      jsonOdm.Geo.MultiPolygon.within = function (multiPolygon, geometry) {
          var i, j, k, found;
          if (!multiPolygon.coordinates || !jsonOdm.util.isArray(multiPolygon.coordinates)) {
              return false;
          }
      Severity: Minor
      Found in src/geo.js - About 7 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 intersects has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
      Open

      jsonOdm.Geo.LineString.intersects = function (lineString, geometry) {
          var i, j;
          if (!lineString.coordinates || !jsonOdm.util.isArray(lineString.coordinates)) {
              return false;
          }
      Severity: Minor
      Found in src/geo.js - About 7 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 within has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
      Open

      jsonOdm.Geo.Point.within = function (point, geometry) {
          var i, j;
          if (!point.coordinates) {
              return false;
          }
      Severity: Minor
      Found in src/geo.js - About 6 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 within has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
      Open

      jsonOdm.Geo.LineString.within = function (lineString, geometry) {
          var i, j;
          if (!lineString.coordinates || !jsonOdm.util.isArray(lineString.coordinates)) {
              return false;
          }
      Severity: Minor
      Found in src/geo.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 intersects has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
      Open

      jsonOdm.Geo.MultiPolygon.intersects = function (multiPolygon, geometry) {
          var i, j, k;
          if (!multiPolygon.coordinates || !jsonOdm.util.isArray(multiPolygon.coordinates)) {
              return false;
          }
      Severity: Minor
      Found in src/geo.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 within has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
      Open

      jsonOdm.Geo.Polygon.within = function (polygon, geometry) {
          var i, j;
          if (!polygon.coordinates || !jsonOdm.util.isArray(polygon.coordinates)) {
              return false;
          }
      Severity: Minor
      Found in src/geo.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 intersects has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
      Open

      jsonOdm.Geo.Polygon.intersects = function (polygon, geometry) {
          var i, j;
          if (!polygon.coordinates || !jsonOdm.util.isArray(polygon.coordinates)) {
              return false;
          }
      Severity: Minor
      Found in src/geo.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 $group has 83 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      jsonOdm.Query.prototype.$group = function () {
          var orderByFields = arguments;
          var accumulationProjectionDefinition = false;
          var aggregationResultBuffer = [];
          // last argument might be a projection
      Severity: Major
      Found in src/query.js - About 3 hrs to fix

        Function within has 82 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        jsonOdm.Geo.MultiPoint.within = function (multiPoint, geometry) {
            var i, j, k, found;
            if (!multiPoint.coordinates || !jsonOdm.util.isArray(multiPoint.coordinates)) {
                return false;
            }
        Severity: Major
        Found in src/geo.js - About 3 hrs to fix

          Function within has 73 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          jsonOdm.Geo.MultiLineString.within = function (multiLineString, geometry) {
              var i, j, k, found;
              if (!multiLineString.coordinates || !jsonOdm.util.isArray(multiLineString.coordinates)) {
                  return false;
              }
          Severity: Major
          Found in src/geo.js - About 2 hrs to fix

            Function $result has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
            Open

            jsonOdm.Query.prototype.$result = function (start, length) {
                if (this.$$commandQueue.length < 1 && this.$$aggregationBeforeCollectQueue < 1) {
                    return this.$$collection;
                }
                start = typeof start === "undefined" ? 0 : start;
            Severity: Minor
            Found in src/query.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 lineStringWithinLineString has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
            Open

            jsonOdm.Geo.lineStringWithinLineString = function (lineString, inLineString) {
                if (!(jsonOdm.util.isArray(lineString) && jsonOdm.util.isArray(inLineString))) {
                    return false;
                }
                var i, j;
            Severity: Minor
            Found in src/geo.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 intersects has 67 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            jsonOdm.Geo.MultiPoint.intersects = function (multiPoint, geometry) {
                var i, j, k;
                if (!multiPoint.coordinates || !jsonOdm.util.isArray(multiPoint.coordinates)) {
                    return false;
                }
            Severity: Major
            Found in src/geo.js - About 2 hrs to fix
              Severity
              Category
              Status
              Source
              Language