creative-connections/aurelia-bodylight-plugin

View on GitHub

Showing 366 of 552 total issues

File markdown-it-bfootnote.js has 259 lines of code (exceeds 250 allowed). Consider refactoring.
Open

//<a onclick="document.getElementById(\'' + anchor + '\').scrollIntoView();">

// Process footnotes
//
//'use strict';
Severity: Minor
Found in src/elements/markdown-it-bfootnote.js - About 2 hrs to fix

    Function _createIEClipArea has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    DygraphCanvasRenderer.prototype._createIEClipArea = function() {
        var className = 'dygraph-clip-div';
        var graphDiv = this.dygraph_.graphDiv;
    
        // Remove old clip divs.
    Severity: Major
    Found in src/utils/dygraph.js - About 2 hrs to fix

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

      Dygraph.prototype.updateOptions = function(input_attrs, block_redraw) {
          if (typeof(block_redraw) == 'undefined') block_redraw = false;
      
          // mapLegacyOptions_ drops the "file" parameter as a convenience to us.
          var file = input_attrs.file;
      Severity: Minor
      Found in src/utils/dygraph.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 parseArray_ has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

      Dygraph.prototype.parseArray_ = function(data) {
          // Peek at the first x value to see if it's numeric.
          if (data.length === 0) {
              this.error("Can't plot empty data set");
              return null;
      Severity: Minor
      Found in src/utils/dygraph.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 bind has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          bind() {
              if (typeof (this.smooth) === 'string') this.smooth = this.smooth === 'true';
              if (typeof (this.step) === 'string') this.step = parseFloat(this.step);
              if (typeof (this.showicons) === 'string') this.showicons = this.showicons === 'true';
              if (typeof (this.globalanim) === 'string') this.globalanim = this.globalanim === 'true';
      Severity: Major
      Found in src/elements/range.js - About 2 hrs to fix

        Function _drawSeries has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        DygraphCanvasRenderer.prototype._drawSeries = function(
            ctx, iter, strokeWidth, pointSize, drawPoints, drawGapPoints,
            stepPlot, strategy) {
        
            var prevCanvasX = null;
        Severity: Major
        Found in src/utils/dygraph.js - About 2 hrs to fix

          Function bind has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            bind() {
              if (this.speedfactor) {
                if (typeof this.speedfactor === 'string') this.speedfactor = parseInt(this.speedfactor, 10);
                if (this.speedfactor <= 0 || this.speedfactor > 100) this.speedfactor = 100;
              }
          Severity: Minor
          Found in src/elements/animate-control.js - About 2 hrs to fix

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

                constructor(){
                    super();
                    this.handleValueChange = e => {
                        //let j = this.currentdataset;
                        //all values from refindex to one dataset - as one curve
            Severity: Minor
            Found in src/elements/chartjs-fixed.js - About 1 hr to fix

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

                initfmi() {
                  console.log('fmi initfmi()');
                  let that = {};
                  if (window.thisfmi) {
                    that.fminame = window.thisfmi.fminame;
              Severity: Minor
              Found in src/elements/fmi.js - About 1 hr to fix

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

                    var generateLegendHTML = function(g, x, sel_points, oneEmWidth) {
                        // TODO(danvk): deprecate this option in place of {legend: 'never'}
                        if (g.getOption('showLabelsOnHighlight') !== true) return '';
                
                        // If no points are selected, we display a default legend. Traditionally,
                Severity: Minor
                Found in src/utils/dygraph.js - About 1 hr to fix

                  Function _renderChartLabels has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                  DygraphCanvasRenderer.prototype._renderChartLabels = function() {
                      var div, class_div;
                  
                      // Generate divs for the chart title, xlabel and ylabel.
                      // Space for these divs has already been taken away from the charting area in
                  Severity: Minor
                  Found in src/utils/dygraph.js - About 1 hr 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 clear has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                  DygraphCanvasRenderer.prototype.clear = function() {
                      var context;
                      if (this.isIE) {
                          // VML takes a while to start up, so we just poll every this.IEDelay
                          try {
                  Severity: Minor
                  Found in src/utils/dygraph.js - About 1 hr 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 setColors_ has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Dygraph.prototype.setColors_ = function() {
                      var num = this.attr_("labels").length - 1;
                      this.colors_ = [];
                      var colors = this.attr_('colors');
                      var i;
                  Severity: Minor
                  Found in src/utils/dygraph.js - About 1 hr 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 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                    bind() {
                      //
                      let convertvalues = this.value.split(';');
                      let identity = x => x;
                      this.operation = [];
                  Severity: Minor
                  Found in src/attributes/value-convertor.js - About 1 hr 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 handleResize has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                    handleResize() {
                      console.log('animateadobe handleResize()');
                      //do not run if ani.lib is not defined - no adobe component is available
                      if (!this.lib) return;
                      let w = this.lib.properties.width; let h = this.lib.properties.height;
                  Severity: Minor
                  Found in src/elements/animate-adobe-ss.js - About 1 hr 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 handleResize has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      handleResize() {
                        console.log('animateadobe handleResize()');
                        //do not run if ani.lib is not defined - no adobe component is available
                        if (!window.ani.lib) return;
                        let w = window.ani.lib.properties.width; let h = window.ani.lib.properties.height;
                  Severity: Minor
                  Found in src/elements/animate-adobe.js - About 1 hr 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 startSimulation has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                    startSimulation() {
                      this.animationstarted = true;
                      this.fpsInterval = 1000 / (isNaN(this.fpslimit) ? parseInt(this.fpslimit, 10) : this.fpslimit);
                      this.then = window.performance.now();
                      const performAnimation = (newtime) => {
                  Severity: Minor
                  Found in src/elements/fmi.js - About 1 hr 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 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      constructor(){
                          super();
                          this.handleValueChange = e => {
                              //let j = this.currentdataset;
                              //all values from refindex to one dataset - as one curve
                  Severity: Minor
                  Found in src/elements/chartjs-fixed.js - About 1 hr 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 attached has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      attached() {
                        //register horizontal line drawing, shows difference line between appropriate points from dataset0 and dataset1
                        Chart.pluginService.register({
                          beforeDraw: function(chart, ease) {
                            if (chart.config.options.XYPlugin && chart.tooltip._active && chart.tooltip._active.length) {
                  Severity: Minor
                  Found in src/elements/chartjs-xy-points.js - About 1 hr to fix

                    Function handleValueChange has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            this.handleValueChange = e => {
                                //let j = this.currentdataset;
                                //all values from refindex to one dataset - as one curve
                                //if (!this.chart.data.datasets[j]) {
                                    //do initialize dataset first
                    Severity: Minor
                    Found in src/elements/chartjs-fixed.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language