creative-connections/aurelia-bodylight-plugin

View on GitHub

Showing 366 of 552 total issues

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

              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/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/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/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/elements/animate-control.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/utils/dygraph.js - About 1 hr to fix

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

                          Function dateParser has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          Dygraph.dateParser = function(dateStr) {
                              var dateStrSlashed;
                              var d;
                          
                              // Let the system try the format first, with one caveat:
                          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 computePlotArea_ has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          DygraphLayout.prototype.computePlotArea_ = function() {
                              var area = {
                                  // TODO(danvk): per-axis setting.
                                  x: 0,
                                  y: 0
                          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 addAnnotationRule has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          Dygraph.addAnnotationRule = function() {
                              if (Dygraph.addedAnnotationCSS) return;
                          
                              var rule = "border: 1px solid black; " +
                                  "background-color: white; " +
                          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 numDateTicks has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          Dygraph.numDateTicks = function(start_time, end_time, granularity) {
                              if (granularity < Dygraph.MONTHLY) {
                                  // Generate one tick mark for every fixed interval of time.
                                  var spacing = Dygraph.SHORT_SPACINGS[granularity];
                                  return Math.floor(0.5 + 1.0 * (end_time - start_time) / spacing);
                          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 _dashedLine has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          DygraphCanvasRenderer.prototype._dashedLine = function(ctx, x, y, x2, y2, pattern) {
                              // Original version http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas
                              // Modified by Russell Valentine to keep line history and continue the pattern
                              // where it left off.
                              var dx, dy, len, rot, patternIndex, segment;
                          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 attr_ has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                          Open

                          Dygraph.prototype.attr_ = function(name, seriesName) {
                          
                              var sources = [];
                              sources.push(this.attrs_);
                              if (this.user_attrs_) {
                          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

                          Severity
                          Category
                          Status
                          Source
                          Language