creative-connections/Bodylight.js-Components

View on GitHub

Showing 430 of 684 total issues

Function log has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

Dygraph.log = function(severity, message) {
    var st;
    if (typeof(printStackTrace) != 'undefined') {
        // Remove uninteresting bits: logging functions and paths.
        st = printStackTrace({guess:false});
Severity: Minor
Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 55 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 attached has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  attached() {
    //console.log('bdlmarkdownaurelia attached() src:', this.src);
    // eslint-disable-next-line new-cap
    //optionally, register customevent handler for 'contentupdate' when fromid is defined
    // eslint-disable-next-line new-cap
Severity: Minor
Found in src_aurelia-bodylight-plugin/src/elements/markdownaurelia.js - About 55 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 9 (exceeds 5 allowed). Consider refactoring.
Open

  constructor() {
    super();
    //create lambda function which is added as listener later
    this.handleValueChange = e => {
      this.value = e.detail.data[this.refindex] * this.numerator / this.denominator;
Severity: Minor
Found in src_aurelia-bodylight-plugin/src/elements/trigger-on-decrease.js - About 55 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 9 (exceeds 5 allowed). Consider refactoring.
Open

  constructor() {
    super();
    this.handleValueChange = e => {
      //e.detail do not reallocate - using same buffer, thus slicing to append to data array
      //let datapoints =e.detail.data.slice(this.refindex, this.refendindex);
Severity: Minor
Found in src_aurelia-bodylight-plugin/src/elements/chartjs-xy.js - About 55 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 9 (exceeds 5 allowed). Consider refactoring.
Open

  constructor() {
    this.isstopped = true;
    this.handleStart = e => {
      //console.log('AnimatedHeart start event gif length:', this.gif.get_length());
      //this.gif.play();
Severity: Minor
Found in src_aurelia-bodylight-plugin/src/elements/animate-gif.js - About 55 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 9 (exceeds 5 allowed). Consider refactoring.
Open

  constructor() {
    super();
    //create lambda function which is added as listener later
    this.handleValueChange = e => {
      this.value = e.detail.data[this.refindex] * this.numerator / this.denominator;
Severity: Minor
Found in src_aurelia-bodylight-plugin/src/elements/audio-on-decrease.js - About 55 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 9 (exceeds 5 allowed). Consider refactoring.
Open

    bind() {
        super.bind();
        if (typeof this.timedenomfixed === 'string') this.timedenomfixed = parseInt(this.timedenomfixed,10);                
        if (typeof this.timedenom === 'string') {
            
Severity: Minor
Found in src_aurelia-bodylight-plugin/src/elements/chartjs-time.js - About 55 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 setAnimationValue has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    setAnimationValue(objname, value) {
      //console.log('animateadobe setAnimationValue',value);
      //console.log('adobe-animate() setting window.ani.exportRoot.children[0][' + objname + '].gotoAndStop(' + value + ')');
      if (window.ani.exportRoot) {
        //resolve path from string
Severity: Minor
Found in src_aurelia-bodylight-plugin/src/elements/animate-adobe.js - About 55 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 setText has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    setText(objname, textvalue) {
      //console.log('animateadobe set text:',textvalue);
      if (window.ani.exportRoot) {
        const resolvePath = (object, path, defaultValue) => path
          .split('.')
Severity: Minor
Found in src_aurelia-bodylight-plugin/src/elements/animate-adobe.js - About 55 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 PLUS has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    PLUS : function(g, name, ctx, cx, cy, color, radius) {
Severity: Major
Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 50 mins to fix

    Function EX has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        EX : function(g, name, ctx, cx, cy, color, radius) {
    Severity: Major
    Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 50 mins to fix

      Function CIRCLE has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          CIRCLE : function(g, name, ctx, cx, cy, color, radius) {
      Severity: Major
      Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 50 mins to fix

        Function regularShape_ has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            ctx, sides, radius, cx, cy, rotationRadians, delta) {
        Severity: Major
        Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 50 mins to fix

          Function DEFAULT has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              DEFAULT : function(g, name, ctx, canvasx, canvasy, color, radius) {
          Severity: Major
          Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 50 mins to fix

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

            DygraphLayout.prototype._evaluateLineCharts = function() {
                // An array to keep track of how many points will be drawn for each set.
                // This will allow for the canvas renderer to not have to check every point
                // for every data set since the points are added in order of the sets in
                // datasets.
            Severity: Minor
            Found in src_aurelia-bodylight-plugin/src/utils/dygraph.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 findPosY has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

            Dygraph.findPosY = function(obj) {
                var curtop = 0;
                if(obj.offsetParent) {
                    var copyObj = obj;
                    while(1) {
            Severity: Minor
            Found in src_aurelia-bodylight-plugin/src/utils/dygraph.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 dateTicker has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            Dygraph.dateTicker = function (a, b, pixels, opts, dygraph, vals) {
            Severity: Minor
            Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 45 mins to fix

              Function numericLinearTicks has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              Dygraph.numericLinearTicks = function (a, b, pixels, opts, dygraph, vals) {
              Severity: Minor
              Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 45 mins to fix

                Function numericTicks has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                Dygraph.numericTicks = function (a, b, pixels, opts, dygraph, vals) {
                Severity: Minor
                Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 45 mins to fix

                  Function _drawPointsOnLine has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  DygraphCanvasRenderer.prototype._drawPointsOnLine = function(ctx, pointsOnLine, drawPointCallback, setName, color, pointSize) {
                  Severity: Minor
                  Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 45 mins to fix
                    Severity
                    Category
                    Status
                    Source
                    Language