creative-connections/aurelia-bodylight-plugin

View on GitHub

Showing 552 of 552 total issues

Function beforeDraw has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        beforeDraw: function(chart, ease) {
          if (chart.config.options.XYPlugin && chart.tooltip._active && chart.tooltip._active.length) {
            let activePoint = chart.tooltip._active[0];
            //console.log('chart horizontal line debug chart activepoint:', activePoint);
            let ctx = chart.ctx;
Severity: Minor
Found in src/elements/chartjs-xy-points.js - About 1 hr to fix

    Function initAdobe has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        initAdobe() {
          console.log('animateadobe initAdobe()');
          //search for composition which has the 'name' in library
          for (let cid of Object.keys(window.AdobeAn.compositions)) {
            let comp = window.AdobeAn.getComposition(cid);
    Severity: Minor
    Found in src/elements/animate-adobe.js - About 1 hr to fix

      Function beforeDraw has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              beforeDraw: function(chart, easing) {
                if (chart.config.options.section && chart.config.options.section.length > 0) {
                  let ctx = chart.chart.ctx;
                  let chartArea = chart.chartArea;
                  let meta = chart.getDatasetMeta(0);
      Severity: Minor
      Found in src/elements/chartjs.js - About 1 hr to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            if (this.controlid) {
              document.getElementById(this.controlid).addEventListener('fmistart', this.handleStart);
              document.getElementById(this.controlid).addEventListener('fmistop', this.handleStop);
            }
        Severity: Major
        Found in src/elements/fmi.js and 1 other location - About 1 hr to fix
        src/elements/fmi.js on lines 362..365

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 67.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Function attached has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          attached() {
            //listening to custom event fmidata
            console.log('dygraph attached');
            if (this.refindex && (this.refindex.indexOf(',')>0)) this.refindices = this.refindex.split(',');
            let fmielement = document.getElementById(this.fromid);
        Severity: Minor
        Found in src/elements/dygraphchart.js - About 1 hr to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              if (this.controlid) {
                document.getElementById(this.controlid).removeEventListener('fmistart', this.handleStart);
                document.getElementById(this.controlid).removeEventListener('fmistop', this.handleStop);
              }
          Severity: Major
          Found in src/elements/fmi.js and 1 other location - About 1 hr to fix
          src/elements/fmi.js on lines 201..204

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 67.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Function createDragInterface_ has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

          Dygraph.prototype.createDragInterface_ = function() {
              var context = {
                  // Tracks whether the mouse is down right now
                  isZooming: false,
                  isPanning: false,  // is this drag part of a pan?
          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 moveTouch has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

          Dygraph.Interaction.moveTouch = function(event, g, context) {
              var i, touches = [];
              for (i = 0; i < event.touches.length; i++) {
                  var t = event.touches[i];
                  touches.push({
          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 processValue has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

            processValue(value) {
              //compare with current segment condition
              //do stop simulation if the condition in 'relation' is met - returns true
              let referencevalue = this.segmentconditions[this.currentsegment].value;
              if (this.segmentconditions[this.currentsegment].relation(value, referencevalue)) {
          Severity: Minor
          Found in src/elements/animate-control.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 39 lines of code (exceeds 25 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 1 hr to fix

            Function drawMiniPlot_ has 39 lines of code (exceeds 25 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 1 hr to fix

              Function createInterface_ has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              Dygraph.prototype.createInterface_ = function() {
                  // Create the all-enclosing graph div
                  var enclosing = this.maindiv_;
              
                  this.graphDiv = document.createElement("div");
              Severity: Minor
              Found in src/utils/dygraph.js - About 1 hr to fix

                Function binarySearch has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                Dygraph.binarySearch = function(val, arry, abs, low, high) {
                    if (low === null || low === undefined ||
                        high === null || high === undefined) {
                        low = 0;
                        high = arry.length - 1;
                Severity: Minor
                Found in src/utils/dygraph.js - About 1 hr to fix

                  Function drawInteractiveLayer_ has 38 lines of code (exceeds 25 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 1 hr to fix

                    Function constructor has 38 lines of code (exceeds 25 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 1 hr to fix

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                                  ctx.fillRect(this.layout_.getPlotArea().x, Math.min(startY, endY),
                                      this.layout_.getPlotArea().w, Math.abs(endY - startY));
                      Severity: Major
                      Found in src/utils/dygraph.js and 1 other location - About 1 hr to fix
                      src/utils/dygraph.js on lines 2960..2961

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 65.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          setinactive(id) {
                            let el = document.getElementById(id.name);
                            if (el) {
                              el.style.display = 'none';
                              id.cls = this.inactiveclass;
                      Severity: Major
                      Found in src/elements/tabs.js and 1 other location - About 1 hr to fix
                      src/elements/tabs.js on lines 72..78

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 65.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                              ctx.clearRect(Math.min(startX, prevEndX), this.layout_.getPlotArea().y,
                                  Math.abs(startX - prevEndX), this.layout_.getPlotArea().h);
                      Severity: Major
                      Found in src/utils/dygraph.js and 1 other location - About 1 hr to fix
                      src/utils/dygraph.js on lines 2968..2969

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 65.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                                  ctx.fillRect(Math.min(startX, endX), this.layout_.getPlotArea().y,
                                      Math.abs(endX - startX), this.layout_.getPlotArea().h);
                      Severity: Major
                      Found in src/utils/dygraph.js and 1 other location - About 1 hr to fix
                      src/utils/dygraph.js on lines 2957..2958

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 65.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          setactive(id) {
                            let el = document.getElementById(id.name);
                            if (el) {
                              el.style.display = 'block';
                              id.cls = this.activeclass;
                      Severity: Major
                      Found in src/elements/tabs.js and 1 other location - About 1 hr to fix
                      src/elements/tabs.js on lines 79..85

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 65.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Severity
                      Category
                      Status
                      Source
                      Language