creative-connections/aurelia-bodylight-plugin

View on GitHub

Showing 366 of 552 total issues

Function bind has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    bind(){
        super.bind();
        this.type = 'scatter';
        this.data.labels = [];
        this.xrefindex = parseInt(this.xrefindex, 10);
Severity: Minor
Found in src/elements/chartjs-fixed-xy.js - About 45 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

Avoid deeply nested control flow statements.
Open

                    if (stepPlot) {
                        strategy.drawLine(prevCanvasX, prevCanvasY, point.canvasx, prevCanvasY);
                        prevCanvasX = point.canvasx;
                    }
Severity: Major
Found in src/utils/dygraph.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if (stepPlot) {
                            newYs = [ point.y_bottom, point.y_top ];
                            prevY = point.y;
                        } else {
                            newYs = [ point.y_bottom, point.y_top ];
    Severity: Major
    Found in src/utils/dygraph.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if (minY > 0) minAxisY = 0;
      Severity: Major
      Found in src/utils/dygraph.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            for (var k = 0; k < annotationCols[col].length; k++) {
                                if (k) ann.text += "\n";
                                ann.text += data.getValue(i, annotationCols[col][k]);
                            }
        Severity: Major
        Found in src/utils/dygraph.js - About 45 mins to fix

          Function attached has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              attached() {
                //disable animation if enabled from previous
                console.log('adobeobj attached()');
                if (window.ani) this.disableAnimation();
                if (this.responsive && (typeof this.responsive === 'string')) this.responsive = this.responsive==='true';
          Severity: Minor
          Found in src/elements/animate-adobe.js - About 45 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

          Avoid deeply nested control flow statements.
          Open

                              if (!Dygraph.isOK(point.y)) {
                                  prevX = NaN;
                                  continue;
                              }
          Severity: Major
          Found in src/utils/dygraph.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                            for (j = Math.max(0, i - rollPeriod + 1); j < i + 1; j++) {
                                y = originalData[j][1];
                                if (y === null || isNaN(y)) continue;
                                num_ok++;
                                sum += originalData[j][1];
            Severity: Major
            Found in src/utils/dygraph.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                              if (prev[1][1] !== null && !isNaN(prev[1][1])) {
                                  low -= prev[1][0];
                                  mid -= prev[1][1];
                                  high -= prev[1][2];
                                  count -= 1;
              Severity: Major
              Found in src/utils/dygraph.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                if (actual_y === null) {
                                    series[j] = [x, null];
                                    continue;
                                }
                Severity: Major
                Found in src/utils/dygraph.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      for (k = 0; k < sum.length; k++) {
                                          y = dataPoint[j][k];
                                          if (y === null || isNaN(y)) continue;
                                          sum[k] += y;
                                          count[k]++;
                  Severity: Major
                  Found in src/utils/dygraph.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                        if (y === null || isNaN(y)) continue;
                    Severity: Major
                    Found in src/utils/dygraph.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          if (spacing > pixels_per_tick) break;
                      Severity: Major
                      Found in src/utils/dygraph.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            if (den) {
                                                var p = value < 0 ? 0 : value, n = den;
                                                var pm = sigma * Math.sqrt(p*(1-p)/n + sigma*sigma/(4*n*n));
                                                var denom = 1 + sigma * sigma / den;
                                                low  = (p + sigma * sigma / (2 * den) - pm) / denom;
                        Severity: Major
                        Found in src/utils/dygraph.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                          for (j = Math.max(0, i - rollPeriod + 1); j < i + 1; j++) {
                                              y = originalData[j][1][0];
                                              if (y === null || isNaN(y)) continue;
                                              num_ok++;
                                              sum += originalData[j][1][0];
                          Severity: Major
                          Found in src/utils/dygraph.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                          if (currentnavitem.parentNode.parentNode && currentnavitem.parentNode.parentNode.parentNode && currentnavitem.parentNode.parentNode.parentNode.className === 'w3-hide')
                                            if (window.bodylightnavopenhide) window.bodylightnavopenhide(currentnavitem.parentNode.parentNode.parentNode.previousSibling);
                            Severity: Major
                            Found in src/elements/markdown-top-nav.js - About 45 mins to fix

                              Function bind has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  bind() {
                                    //console.log('button.bind()');
                                    this.ids2send = this.ids.split(',');
                                    this.createids = [];
                                    //create those ids not yet in HTML DOM and put them to createids array
                              Severity: Minor
                              Found in src/elements/buttonparams.js - About 45 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 watch has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                              let watch = (callback) => {
                                watchCallback = callback || watchCallback;
                              
                                // watch every glob individually
                                for(let watcher of watches) {
                              Severity: Minor
                              Found in aurelia_project/tasks/watch.js - About 45 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 8 (exceeds 5 allowed). Consider refactoring.
                              Open

                              constructor() {
                                  super();
                                  this.handleValueChange = e => {
                                      //sets data to dataset
                                      //apply value convert among all data
                              Severity: Minor
                              Found in src/elements/range-smooth2.js - About 45 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

                              Avoid deeply nested control flow statements.
                              Open

                                                                  if (value.y) ctx.fillText(value.y.toPrecision(4),x,y);
                              Severity: Major
                              Found in src/elements/chartjs-fixed.js - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language