creative-connections/aurelia-bodylight-plugin

View on GitHub

Showing 366 of 552 total issues

Function open has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    open(newid) {
      if (this.active) {
        this.setinactive(this.active);
        this.setactive(newid);
        this.active = newid;
Severity: Minor
Found in src/elements/tabs.js - About 35 mins 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 initAdobe has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    initAdobe() {
      console.log('animateadobe initAdobe()');
      //search for composition which has the 'name' in library
      for (let cid of Object.keys(window.AdobeAn.compositions)) {
        let comp = window.AdobeAn.getComposition(cid);
Severity: Minor
Found in src/elements/animate-adobe.js - About 35 mins 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 attached has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    attached() {
        this.time = new Date();
        this.starttime = Math.round(this.time.getTime() / 1000);
        //this.remoteurl =         localStorage.getItem('bdl-fhir-url');
        //this.remoteheadervalue = localStorage.getItem('bdl-fhir-api-key');
Severity: Minor
Found in src/elements/remote-value.js - About 35 mins 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 7 (exceeds 5 allowed). Consider refactoring.
Open

    bind() {
      if (this.fromid) {
        let fromel = document.getElementById(this.fromid);
        if (fromel) {
          this.registerAnimateEvents(fromel);
Severity: Minor
Found in src/elements/animate-adobe.js - About 35 mins 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 segment has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  segment() {
    if (!this.segmentcond) {
      //play from current position up to the frame on the next segment
      this.stopframe = this.segmentitems[this.currentsegment];
      //position in segment
Severity: Minor
Found in src/elements/animate-control.js - About 35 mins 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 startstop has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    startstop() {
      console.log('animateadobecontrol startstop()', this);
      if (!this.onetime && !this.animationstarted) {
          //animate-adobe component playafterstart=false - start it once
          window.ani.startAllAnimation();
Severity: Minor
Found in src/elements/animate-adobe-control.js - About 35 mins 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 updateData has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  updateData(e) {
    let j = 0;
    for (let i = this.refindex; i < this.refindex + this.refvalues; i++) {
      //adds data to datasets

Severity: Minor
Found in src/elements/plotly.js - About 35 mins 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 getAnimateObj has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    getAnimateObj(objname) {
      if (window.ani.exportRoot) {
        const resolvePath = (object, path, defaultValue) => path
        .split('.')
        .reduce((o, p) => o ? o[p] : defaultValue, object);
Severity: Minor
Found in src/elements/animate-adobe.js - About 35 mins 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 7 (exceeds 5 allowed). Consider refactoring.
Open

    bind() {
        super.bind();
        this.type = "bar"

        this.options.scales.xAxes = [{ stacked: true }];
Severity: Minor
Found in src/elements/chartjs-stacked.js - About 35 mins 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

Avoid too many return statements within this function.
Open

                return mid;
Severity: Major
Found in src/utils/dygraph.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return Dygraph.binarySearch(val, arry, abs, mid + 1, high);
    Severity: Major
    Found in src/utils/dygraph.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return true;
      Severity: Major
      Found in src/elements/markdown-it-bfootnote.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return self.attr_(opt);
        Severity: Major
        Found in src/utils/dygraph.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return data;
          Severity: Major
          Found in src/utils/dygraph.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                if (silent) { return true; }
            Severity: Major
            Found in src/elements/markdown-it-bfootnote.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  return true;
              Severity: Major
              Found in src/elements/markdown-it-bfootnote.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    if (pos === start + 2) { return false; } // no empty footnote labels
                Severity: Major
                Found in src/elements/markdown-it-bfootnote.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                        if (state.src.charCodeAt(pos) === 0x20) { return false; }
                  Severity: Major
                  Found in src/elements/markdown-it-bfootnote.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                          if (state.src.charCodeAt(pos) === 0x0A) { return false; }
                    Severity: Major
                    Found in src/elements/markdown-it-bfootnote.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return parsedData;
                      Severity: Major
                      Found in src/utils/dygraph.js - About 30 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language