creative-connections/aurelia-bodylight-plugin

View on GitHub

Showing 366 of 552 total issues

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

  deregisterInputs() {
    //do removeListeners()
    if (this.inputs) {
      let inputparts = this.inputs.split(';');
      for (let inputpart of inputparts) {
Severity: Minor
Found in 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 bind has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    bind() {
      if (this.w3class) {
          this.activeclass= this.w3class+ ' '+this.activeclasstemplate;
          this.inactiveclass= this.w3class+' '+this.inactiveclasstemplate;
      } else {
Severity: Minor
Found in src/elements/tabs.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(httpclient) {
        this.client = httpclient;
        this.handleTick = () => {
            if (this.started) {
                //do periodic stuff
Severity: Minor
Found in src/elements/remote-value.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/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 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/utils/dygraph.js - About 1 hr to fix

    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/utils/dygraph.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/elements/animate-adobe-ss.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/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/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/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/elements/animate-adobe-ss.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 (!window.ani.lib) return;
                      let w = window.ani.lib.properties.width; let h = window.ani.lib.properties.height;
                Severity: Minor
                Found in src/elements/animate-adobe.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/elements/chartjs-fixed.js - About 1 hr to fix

                    Function clear has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    DygraphCanvasRenderer.prototype.clear = function() {
                        var context;
                        if (this.isIE) {
                            // VML takes a while to start up, so we just poll every this.IEDelay
                            try {
                    Severity: Minor
                    Found in src/utils/dygraph.js - About 1 hr to fix

                      Function _evaluateLimits has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      DygraphLayout.prototype._evaluateLimits = function () {
                          //TODO(tomaton): fix xrange when last x value is not the highest in case of x = sin(y) x is from 0 to 1 and back to 0
                          //and range for x is 0 to 1
                          this.minxval = this.maxxval = null;
                          if (this.dateWindow_) {
                      Severity: Minor
                      Found in src/utils/dygraph.js - About 1 hr to fix

                        Function constructor has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          constructor() {
                            //this.data = [[0, 0, 0]];
                        
                            //this.data=[[1, 5], [2, 5], [3, 4.9], [4, 4.8], [5, 5.2]];
                        
                        
                        Severity: Minor
                        Found in src/elements/dygraphchart.js - About 1 hr to fix

                          Function generateSource has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            generateSource(className) {
                              return `import {inject} from 'aurelia-dependency-injection';
                          import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli';
                          
                          @inject(Project, CLIOptions, UI)
                          Severity: Minor
                          Found in aurelia_project/generators/generator.js - About 1 hr to fix

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

                              bind() {
                                //
                                let convertvalues = this.value.split(';');
                                let identity = x => x;
                                this.operation = [];
                            Severity: Minor
                            Found in src/attributes/value-convertor.js - About 1 hr to fix

                              Function treatMouseOpAsClick has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Dygraph.Interaction.treatMouseOpAsClick = function(g, event, context) {
                                  var clickCallback = g.attr_('clickCallback');
                                  var pointClickCallback = g.attr_('pointClickCallback');
                              
                                  var selectedPoint = null;
                              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 mapLegacyOptions_ has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                              Open

                              Dygraph.mapLegacyOptions_ = function(attrs) {
                                  var my_attrs = {};
                                  for (var k in attrs) {
                                      if (k == 'file') continue;
                                      if (attrs.hasOwnProperty(k)) my_attrs[k] = attrs[k];
                              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