creative-connections/Bodylight.js-Components

View on GitHub

Showing 684 of 684 total issues

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_aurelia-bodylight-plugin/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_aurelia-bodylight-plugin/src/utils/dygraph.js - About 1 hr to fix

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

          static parse(uuid) {
              var _a, _b, _c, _d;
              let hex = undefined;
              switch (uuid.length) {
                  case 32:
      Severity: Minor
      Found in src_aurelia-bodylight-plugin/src/utils/uuidv7.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_aurelia-bodylight-plugin/src/elements/chartjs.js - About 1 hr to fix

          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_aurelia-bodylight-plugin/src/elements/tabs.js and 1 other location - About 1 hr to fix
          src_aurelia-bodylight-plugin/src/elements/tabs.js on lines 98..104

          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_aurelia-bodylight-plugin/src/utils/dygraph.js and 1 other location - About 1 hr to fix
          src_aurelia-bodylight-plugin/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_aurelia-bodylight-plugin/src/utils/dygraph.js and 1 other location - About 1 hr to fix
          src_aurelia-bodylight-plugin/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

                  ctx.clearRect(this.layout_.getPlotArea().x, Math.min(startY, prevEndY),
                      this.layout_.getPlotArea().w, Math.abs(startY - prevEndY));
          Severity: Major
          Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js and 1 other location - About 1 hr to fix
          src_aurelia-bodylight-plugin/src/utils/dygraph.js on lines 2974..2975

          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_aurelia-bodylight-plugin/src/elements/tabs.js and 1 other location - About 1 hr to fix
          src_aurelia-bodylight-plugin/src/elements/tabs.js on lines 105..111

          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(this.layout_.getPlotArea().x, Math.min(startY, endY),
                          this.layout_.getPlotArea().w, Math.abs(endY - startY));
          Severity: Major
          Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js and 1 other location - About 1 hr to fix
          src_aurelia-bodylight-plugin/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

          Function computePlotArea_ has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          DygraphLayout.prototype.computePlotArea_ = function() {
              var area = {
                  // TODO(danvk): per-axis setting.
                  x: 0,
                  y: 0
          Severity: Minor
          Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 1 hr to fix

            Function setSelection has 37 lines of code (exceeds 25 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_aurelia-bodylight-plugin/src/utils/dygraph.js - About 1 hr to fix

              Function footnoteRef has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function footnoteRef(state, silent) {
                  let label;
                  let pos;
                  let footnoteId;
                  let footnoteSubId;
              Severity: Minor
              Found in src_aurelia-bodylight-plugin/src/elements/markdown-it-bfootnote.js - About 1 hr to fix

                Function processValue has 37 lines of code (exceeds 25 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_aurelia-bodylight-plugin/src/elements/animate-control.js - About 1 hr to fix

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

                  export default function processMarkup() {
                    return gulp.src(project.markupProcessor.source, {sourcemaps: true, since: gulp.lastRun(processMarkup)})
                      .pipe(build.bundle());
                  }
                  src_aurelia-bodylight-plugin/aurelia_project/tasks/process-css.js on lines 5..8

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

                  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

                  export default function processCSS() {
                    return gulp.src(project.cssProcessor.source, {sourcemaps: true, since: gulp.lastRun(processCSS)})
                      .pipe(build.bundle());
                  }
                  src_aurelia-bodylight-plugin/aurelia_project/tasks/process-markup.js on lines 5..8

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

                  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

                      attached() {
                        this.ea.subscribe('navchange', navstruct => this.updatenav(navstruct));
                        this.ea.subscribe('hashchange', hashstruct => this.updatetitles(hashstruct));
                      }
                  src_aurelia-bodylight-plugin/src/elements/markdown-bottom-nav.js on lines 23..26

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

                  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

                      attached() {
                        this.ea.subscribe('navchange', navstruct => this.updatenav(navstruct));
                        this.ea.subscribe('hashchange', hashstruct => this.changesrc(hashstruct));
                      }
                  src_aurelia-bodylight-plugin/src/elements/markdown-top-nav.js on lines 34..37

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

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

                  Dygraph.prototype.drawGraph_ = function() {
                      var start = new Date();
                  
                      // This is used to set the second parameter to drawCallback, below.
                      var is_initial_draw = this.is_initial_draw_;
                  Severity: Minor
                  Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 1 hr to fix

                    Function startTouch has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Dygraph.Interaction.startTouch = function(event, g, context) {
                        event.preventDefault();  // touch browsers are all nice.
                        var touches = [];
                        for (var i = 0; i < event.touches.length; i++) {
                            var t = event.touches[i];
                    Severity: Minor
                    Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language