creative-connections/aurelia-bodylight-plugin

View on GitHub

Showing 552 of 552 total issues

Function hsvToRGB has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Dygraph.hsvToRGB = function (hue, saturation, value) {
    var red;
    var green;
    var blue;
    if (saturation === 0) {
Severity: Minor
Found in src/utils/dygraph.js - About 1 hr to fix

    Function findClosestPoint has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Dygraph.prototype.findClosestPoint = function(domX, domY) {
        var minDist = Infinity;
        var idx = -1;
        var points = this.layout_.points;
        var dist, dx, dy, point, closestPoint, closestSeries;
    Severity: Minor
    Found in src/utils/dygraph.js - About 1 hr to fix

      Function updateDeep has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Dygraph.updateDeep = function (self, o) {
          // Taken from http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
          function isNode(o) {
              return (
                  typeof Node === "object" ? o instanceof Node :
      Severity: Minor
      Found in src/utils/dygraph.js - About 1 hr to fix

        Function updatetitles has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          updatetitles(hashstruct) {
              //this.currentlink
              console.log('top nav hash:', hashstruct);
              if (window.markdownnav) {
                let currentlink = '#' + (hashstruct[0].length > 0 ? hashstruct[0] : this.index);
        Severity: Minor
        Found in src/elements/markdown-top-nav.js - About 1 hr to fix

          Function createZoomHandles_ has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          DygraphRangeSelector.prototype.createZoomHandles_ = function() {
              var img = new Image();
              img.className = 'dygraph-rangesel-zoomhandle';
              img.style.position = 'absolute';
              img.style.zIndex = 10;
          Severity: Minor
          Found in src/utils/dygraph.js - About 1 hr to fix

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

              bind() {
                this.isOneshot = this.mode === 'oneshot';
                this.isOnestep = this.mode === 'onestep';
                if (this.isOnestep) {
                  this.showcontrols = false;
            Severity: Minor
            Found in src/elements/fmi.js - About 1 hr to fix

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

                      this.navtitle = (currentlinkindex > 0) && (currentlinkindex < window.markdownnav.links.length)
                        ? window.markdownnav.links[currentlinkindex].title
                        : '';
              Severity: Major
              Found in src/elements/markdown-top-nav.js and 1 other location - About 1 hr to fix
              src/elements/markdown-top-nav.js on lines 114..116

              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 56.

              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

                      this.navtitle = (currentlinkindex > 0) && (currentlinkindex < window.markdownnav.links.length)
                        ? window.markdownnav.links[currentlinkindex].title
                        : '';
              Severity: Major
              Found in src/elements/markdown-top-nav.js and 1 other location - About 1 hr to fix
              src/elements/markdown-top-nav.js on lines 49..51

              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 56.

              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

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

                        if (window.ani.stage) {
                          //TODO call removeEventListener and refactor adding listener when animation should start
                          if (!window.ani.animationstarted) window.ani.enableAnimation();//window.createjs.Ticker.addEventListener('tick', window.ani.stage);
                          window.ani.stage.play();
                        } else {
              Severity: Major
              Found in src/elements/animate-adobe.js and 1 other location - About 1 hr to fix
              src/elements/animate-adobe.js on lines 511..527

              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 56.

              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

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

                    if (window.ani.stage) {
                      //TODO call removeEventListener and refactor adding listener when animation should start
                      if (!window.ani.animationstarted) window.ani.enableAnimation();//window.createjs.Ticker.addEventListener('tick', window.ani.stage);
                      window.ani.stage.play();
                    } else {
              Severity: Major
              Found in src/elements/animate-adobe.js and 1 other location - About 1 hr to fix
              src/elements/animate-adobe.js on lines 519..525

              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 56.

              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 get has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  get() {
                      //sends GET request to
                      let myheaders = new Headers();
                      //localStorage.setItem('bdl-fhir-url',this.remoteurl);
                      if (this.remoteheadervalue && this.remoteheadervalue.length > 0) {
              Severity: Minor
              Found in src/elements/remote-value.js - About 1 hr to fix

                Function attached has 26 lines of code (exceeds 25 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/elements/markdownaurelia.js - About 1 hr to fix

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

                      bind() {
                          super.bind();
                  
                          //done in super
                          //this.chlabels = this.labels.split(','); //labels for each dataset
                  Severity: Minor
                  Found in src/elements/chartjs-time.js - About 1 hr to fix

                    Function toc_body has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      md.renderer.rules.toc_body = function(tokens, index) {
                        let results = [];
                        let previousLevel = 0;
                    
                        for (let i = 0; i < headingInfos.length; i++) {
                    Severity: Minor
                    Found in src/elements/markdown-it-btoc.js - About 1 hr to fix

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

                          this.handleValueChange = e => {
                            let datapoint = [];
                            if (!this.xy) datapoint.push(e.detail.time);
                            //e.detail do not reallocate - using same buffer, thus slicing to append to data array
                            let edata = e.detail.data.slice();
                      Severity: Minor
                      Found in src/elements/dygraphchart.js - About 1 hr to fix

                        Function DrawPolygon_ has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        Dygraph.DrawPolygon_ = function(sides, rotationRadians, ctx, cx, cy, color, radius, delta) {
                        Severity: Major
                        Found in src/utils/dygraph.js - About 1 hr to fix

                          Function _drawSeries has 8 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              ctx, iter, strokeWidth, pointSize, drawPoints, drawGapPoints,
                              stepPlot, strategy) {
                          Severity: Major
                          Found in src/utils/dygraph.js - About 1 hr to fix

                            Function drawZoomRect_ has 8 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            Dygraph.prototype.drawZoomRect_ = function(direction, startX, endX, startY,
                                                                       endY, prevDirection, prevEndX,
                                                                       prevEndY) {
                            Severity: Major
                            Found in src/utils/dygraph.js - About 1 hr to fix

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

                                  if (this.attr_('y2label') && this.dygraph_.numAxes() == 2) {
                                      div = createRotatedDiv(2, 'dygraph-label dygraph-y2label',
                                          this.attr_('y2label'));
                                      this.container.appendChild(div);
                                      this.chartLabels.y2label = div;
                              Severity: Major
                              Found in src/utils/dygraph.js and 1 other location - About 1 hr to fix
                              src/utils/dygraph.js on lines 989..994

                              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 55.

                              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

                                  if (this.attr_('ylabel')) {
                                      div = createRotatedDiv(1, 'dygraph-label dygraph-ylabel',
                                          this.attr_('ylabel'));
                                      this.container.appendChild(div);
                                      this.chartLabels.ylabel = div;
                              Severity: Major
                              Found in src/utils/dygraph.js and 1 other location - About 1 hr to fix
                              src/utils/dygraph.js on lines 995..1000

                              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 55.

                              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