creative-connections/aurelia-bodylight-plugin

View on GitHub

Showing 366 of 552 total issues

Avoid too many return statements within this function.
Open

    if (isNaN(p.x) || (!allowNaNY && isNaN(p.y))) return false;
Severity: Major
Found in src/utils/dygraph.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        if (typeof state.env.footnotes.refs[':' + label] === 'undefined') { return false; }
    Severity: Major
    Found in src/elements/markdown-it-bfootnote.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          if (pos === start + 2) { return false; } // no empty footnote labels
      Severity: Major
      Found in src/elements/markdown-it-bfootnote.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return self.axes_[1][opt];
        Severity: Major
        Found in src/utils/dygraph.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              if (pos + 1 >= max || state.src.charCodeAt(++pos) !== 0x3A /* : */) { return false; }
          Severity: Major
          Found in src/elements/markdown-it-bfootnote.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return true;
            Severity: Major
            Found in src/elements/markdown-it-bfootnote.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  if (pos >= max) { return false; }
              Severity: Major
              Found in src/elements/markdown-it-bfootnote.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return true;
                Severity: Major
                Found in src/utils/dygraph.js - About 30 mins to fix

                  Function dateAxisFormatter has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Dygraph.dateAxisFormatter = function(date, granularity) {
                      if (granularity >= Dygraph.DECADAL) {
                          return date.strftime('%Y');
                      } else if (granularity >= Dygraph.MONTHLY) {
                          return date.strftime('%b %y');
                  Severity: Minor
                  Found in src/utils/dygraph.js - About 25 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 drawMiniPlot_ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  DygraphRangeSelector.prototype.drawMiniPlot_ = function() {
                      var fillStyle = this.attr_('rangeSelectorPlotFillColor');
                      var strokeStyle = this.attr_('rangeSelectorPlotStrokeColor');
                      if (!fillStyle && !strokeStyle) {
                          return;
                  Severity: Minor
                  Found in src/utils/dygraph.js - About 25 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 bind has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                    bind() {
                      this.paramname = [];
                      this.paramindex = [];
                      if (!this.params) return;
                      console.log('watchhashcore.bind() params:', this.params);
                  Severity: Minor
                  Found in src/attributes/watch-hash-core.js - About 25 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 compareArrays has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Dygraph.compareArrays = function(array1, array2) {
                      if (!Dygraph.isArrayLike(array1) || !Dygraph.isArrayLike(array2)) {
                          return false;
                      }
                      if (array1.length !== array2.length) {
                  Severity: Minor
                  Found in src/utils/dygraph.js - About 25 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 isSupported has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  DygraphCanvasRenderer.isSupported = function(canvasName) {
                      var canvas = null;
                      try {
                          if (typeof(canvasName) == 'undefined' || canvasName === null) {
                              canvas = document.createElement("canvas");
                  Severity: Minor
                  Found in src/utils/dygraph.js - About 25 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 _evaluateAnnotations has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  DygraphLayout.prototype._evaluateAnnotations = function() {
                      // Add the annotations to the point to which they belong.
                      // Make a map from (setName, xval) to annotation for quick lookups.
                      var i;
                      var annotations = {};
                  Severity: Minor
                  Found in src/utils/dygraph.js - About 25 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 animateSelection_ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Dygraph.prototype.animateSelection_ = function(direction) {
                      var totalSteps = 10;
                      var millis = 30;
                      if (this.fadeLevel === undefined) this.fadeLevel = 0;
                      if (this.animateId === undefined) this.animateId = 0;
                  Severity: Minor
                  Found in src/utils/dygraph.js - About 25 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 findMaxXindex has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Dygraph.prototype.findMaxXindex = function (arr) {
                      if (this.maxXindex === null) {
                          this.maxXindex = 0;
                          var x2 = arr[0][0]
                          for (var maxi = 1; maxi < arr.length; maxi++){
                  Severity: Minor
                  Found in src/utils/dygraph.js - About 25 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 findMinXindex has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Dygraph.prototype.findMinXindex = function (arr) {
                      if (this.minXindex === null) {
                          this.minXindex = 0;
                          var x2 = arr[0][0]
                          for (var maxi = 1; maxi < arr.length; maxi++){
                  Severity: Minor
                  Found in src/utils/dygraph.js - About 25 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 extractSeries_ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Dygraph.prototype.extractSeries_ = function(rawData, i, logScale) {
                      var series = [];
                      for (var j = 0; j < rawData.length; j++) {
                          var x = rawData[j][0];
                          var point = rawData[j][i];
                  Severity: Minor
                  Found in src/utils/dygraph.js - About 25 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 drawInteractiveLayer_ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  DygraphRangeSelector.prototype.drawInteractiveLayer_ = function() {
                      var ctx = this.fgcanvas_ctx_;
                      ctx.clearRect(0, 0, this.canvasRect_.w, this.canvasRect_.h);
                      var margin = 1;
                      var width = this.canvasRect_.w - margin;
                  Severity: Minor
                  Found in src/utils/dygraph.js - About 25 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 constructor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      constructor(){
                          //this is to register listener function - per aurelia docs -this needs to be done this way
                          this.handleChange = e => {
                              if (e.detail && e.detail.id) {
                                  //detail.id is name, need to match in idlist
                  Severity: Minor
                  Found in src/elements/tabs.js - About 25 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

                  Severity
                  Category
                  Status
                  Source
                  Language