creative-connections/aurelia-bodylight-plugin

View on GitHub

Showing 366 of 552 total issues

Function parseCSV_ has 104 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Dygraph.prototype.parseCSV_ = function(data) {
    var ret = [];
    var lines = data.split("\n");
    var vals, j;

Severity: Major
Found in src/utils/dygraph.js - About 4 hrs to fix

    Function _evaluateLimits has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

    DygraphLayout.prototype._evaluateLimits = function () {
        //TODO(tomaton): fix xrange when last x value is not the highest in case of x = sin(y) x is from 0 to 1 and back to 0
        //and range for x is 0 to 1
        this.minxval = this.maxxval = null;
        if (this.dateWindow_) {
    Severity: Minor
    Found in src/utils/dygraph.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 doUnzoom_ has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

    Dygraph.prototype.doUnzoom_ = function() {
        var dirty = false, dirtyX = false, dirtyY = false;
        if (this.dateWindow_ !== null) {
            dirty = true;
            dirtyX = true;
    Severity: Minor
    Found in src/utils/dygraph.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 constructor has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

      constructor() {
        this.handleValueChange = e => {
          //sets data to dataset
          //apply value convert among all data
          let rawdata;
    Severity: Minor
    Found in src/elements/chartjs.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 bind has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

      bind() {
        //register throttled update function    
        if (typeof this.throttle === 'string') this.throttle = parseInt(this.throttle, 10);
        if (typeof this.dataevent === 'string') this.dataevent = this.dataevent === 'true';
        if (typeof this.precision === 'string') this.precision = parseInt(this.precision, 10);
    Severity: Minor
    Found in src/elements/value.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 constructor has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        constructor() {
            super();
            //this.type = 'line';
            this.handleValueChange = e => {
                //e.detail do not reallocate - using same buffer, thus slicing to append to data array
    Severity: Minor
    Found in src/elements/chartjs-time.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 isPixelChangingOptionList has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
    Open

    Dygraph.isPixelChangingOptionList = function(labels, attrs) {
        // A whitelist of options that do not change pixel positions.
        var pixelSafeOptions = {
            'annotationClickHandler': true,
            'annotationDblClickHandler': true,
    Severity: Minor
    Found in src/utils/dygraph.js - About 3 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 computeCombinedSeriesAndLimits_ has 96 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    DygraphRangeSelector.prototype.computeCombinedSeriesAndLimits_ = function() {
        var data = this.dygraph_.rawData_;
        var logscale = this.attr_('logscale');
    
        // Create a combined series (average of all series values).
    Severity: Major
    Found in src/utils/dygraph.js - About 3 hrs to fix

      Function constructor has 95 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: Major
      Found in src/elements/chartjs-fixed-xy.js - About 3 hrs to fix

        Function markdownitbtoc has 95 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function markdownitbtoc(md, _options) {
          // Set default options
          let options = Object.assign({}, defaultOptions, _options);
        
          // Global variables
        Severity: Major
        Found in src/elements/markdown-it-btoc.js - About 3 hrs to fix

          Function _renderChartLabels has 94 lines of code (exceeds 25 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: Major
          Found in src/utils/dygraph.js - About 3 hrs to fix

            Function updateSelection_ has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
            Open

            Dygraph.prototype.updateSelection_ = function(opt_animFraction) {
                var defaultPrevented = this.cascadeEvents_('select', {
                    selectedX: this.lastx_,
                    selectedPoints: this.selPoints_
                });
            Severity: Minor
            Found in src/utils/dygraph.js - About 3 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 setSelection has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
            Open

            Dygraph.prototype.setSelection = function(row, opt_seriesName) {
                // Extract the points we've selected
                this.selPoints_ = [];
                var pos = 0;
            
            
            Severity: Minor
            Found in src/utils/dygraph.js - About 3 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 attached has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
            Open

                attached() {
                    if (this.refpointindex) {
                        Chart.pluginService.register({
                            id: 'custom_lines to ref point',
                            afterDraw: (chart) => {
            Severity: Minor
            Found in src/elements/chartjs-fixed.js - About 3 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 handleValueChange has 92 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
                        let ydata = e.detail.data.slice(this.refindex, this.refindex + this.refvalues);
                        let y2data = [];
            Severity: Major
            Found in src/elements/chartjs-fixed-xy.js - About 3 hrs to fix

              Function __init__ has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

              Dygraph.prototype.__init__ = function (div, file, attrs) {
                  // Hack for IE: if we're using excanvas and the document hasn't finished
                  // loading yet (and hence may not have initialized whatever it needs to
                  // initialize), then keep calling this routine periodically until it has.
                  if (/MSIE/.test(navigator.userAgent) && !window.opera &&
              Severity: Minor
              Found in src/utils/dygraph.js - About 3 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 findStackedPoint has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

              Dygraph.prototype.findStackedPoint = function(domX, domY) {
                  var row = this.findClosestRow(domX);
                  var boundary = this.getLeftBoundary_();
                  var rowIdx = row - boundary;
                  var points = this.layout_.points;
              Severity: Minor
              Found in src/utils/dygraph.js - About 3 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 constructor has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                constructor() {
                  //create lambda function which is added as listener later
                  this.changeinputs = {}; //[]; change to associative array
                  this.handleValueChange = e => {
                    //e.target; //triggered the event
              Severity: Minor
              Found in src/elements/fmi.js - About 3 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 a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  bind() {
                    super.bind();
                    this.plugins = [ChartDataLabels];
                    if (this.extremelimits) {
                      this.elimits = this.extremelimits.split(','); //split by comma
              Severity: Minor
              Found in src/elements/chartjs-barplot.js - About 3 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 constructor has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

                  constructor() {
                    this.handleTick = e => {
                      this.currenttick++;
                      if (this.currenttick >= this.ticks2reset) {
                        //do reset values
              Severity: Minor
              Found in src/elements/buttonparams.js - About 3 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

              Severity
              Category
              Status
              Source
              Language