creative-connections/Bodylight.js-Components

View on GitHub

Showing 430 of 684 total issues

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

    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_aurelia-bodylight-plugin/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_aurelia-bodylight-plugin/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 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_aurelia-bodylight-plugin/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_aurelia-bodylight-plugin/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_aurelia-bodylight-plugin/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_aurelia-bodylight-plugin/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 deregisterInputs has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

      deregisterInputs() {
        console.warn('deregistering inputs');//do removeListeners()
        window.animateranges = [];
        if (this.inputs) {
          let inputparts = this.inputs.split(';');
    Severity: Minor
    Found in src_aurelia-bodylight-plugin/src/elements/fmi.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 setInputVariables has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

      setInputVariables() {
        for (let key in this.changeinputs) {
          let myinputs = this.changeinputs[key];
          //console.log('changing inputs', myinputs);
          //set real - reference is in - one input one reference
    Severity: Minor
    Found in src_aurelia-bodylight-plugin/src/elements/fmi.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 a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        constructor() {
          super();
          this.handleValueChange = e => {
            //sets data to dataset
            //apply value convert among all data
    Severity: Minor
    Found in src_aurelia-bodylight-plugin/src/elements/chartjs-barplot.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 _evaluateLineCharts has 35 lines of code (exceeds 25 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 1 hr to fix

      Function doAnimatedZoom has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Dygraph.prototype.doAnimatedZoom = function(oldXRange, newXRange, oldYRanges, newYRanges, callback) {
          var steps = this.attr_("animatedZooms") ? Dygraph.ANIMATION_STEPS : 1;
      
          var windows = [];
          var valueRanges = [];
      Severity: Minor
      Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 1 hr to fix

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

            bind() {
              super.bind();
              console.log('chartjs xy point bind()');
              if (this.xmin) {
                //sets yscale min
        Severity: Minor
        Found in src_aurelia-bodylight-plugin/src/elements/chartjs-xy-points.js - About 1 hr to fix

          Function getScript has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            getScript(source, callback) {
              //check whether the script is not already there
              if (Array.from(document.getElementsByTagName('script')).filter(x=> x.getAttribute('src') === source).length > 0) {
                console.warn('AnimateAdobe.getScript() WARNING, script is already added into DOM:', source);
                //do callback?
          Severity: Minor
          Found in src_aurelia-bodylight-plugin/src/elements/animate-adobe-ss.js - About 1 hr to fix

            Function getScript has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                getScript(source, callback) {
                  //check whether the script is not already there
                  if (Array.from(document.getElementsByTagName('script')).filter(x=> x.getAttribute('src') === source).length > 0) {
                    console.warn('AnimateAdobe.getScript() WARNING, script is already added into DOM:', source);
                    //do callback?
            Severity: Minor
            Found in src_aurelia-bodylight-plugin/src/elements/animate-adobe.js - About 1 hr to fix

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

                Function handleResize has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  handleResize() {
                    console.log('animateadobe handleResize()');
                    //do not run if ani.lib is not defined - no adobe component is available
                    if (!this.lib) return;
                    let w = this.lib.properties.width; let h = this.lib.properties.height;
                Severity: Minor
                Found in src_aurelia-bodylight-plugin/src/elements/animate-adobe-ss.js - About 1 hr to fix

                  Function processAnswers has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      processAnswers(data) {
                          //const dbRef = ref(this.database, 'answers/');
                          //dbRef.once('value', snapshot => {
                          //const data = snapshot.val();
                          let aggregatedResults = {}
                  Severity: Minor
                  Found in src_aurelia-bodylight-plugin/src/elements/fb-config.js - About 1 hr to fix

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

                      bind() {
                        //either badges are defined - images in slot, or images are defined
                        //badges = 5, defines number of dots/badges generated
                        //create items array - numbers from 0 to 'badges -1'
                        if (this.infos) {
                    Severity: Minor
                    Found in src_aurelia-bodylight-plugin/src/elements/carousel.js - About 1 hr to fix

                      Function afterDraw has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                      afterDraw: (chart) => {
                                          if (chart.config.options.refpointplugin) {
                                              const ctx = chart.canvas.getContext('2d');
                                              ctx.save();
                      
                      
                      Severity: Minor
                      Found in src_aurelia-bodylight-plugin/src/elements/chartjs-fixed.js - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language