creative-connections/Bodylight.js-Components

View on GitHub

Showing 430 of 684 total issues

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_aurelia-bodylight-plugin/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

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_aurelia-bodylight-plugin/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_aurelia-bodylight-plugin/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 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_aurelia-bodylight-plugin/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

Avoid too many return statements within this function.
Open

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

    Avoid too many return statements within this function.
    Open

            return data;
    Severity: Major
    Found in src_aurelia-bodylight-plugin/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_aurelia-bodylight-plugin/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_aurelia-bodylight-plugin/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_aurelia-bodylight-plugin/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_aurelia-bodylight-plugin/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_aurelia-bodylight-plugin/src/utils/dygraph.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_aurelia-bodylight-plugin/src/elements/markdown-it-bfootnote.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      if (typeof state.env.footnotes.refs[':' + label] === 'undefined') { return false; }
                  Severity: Major
                  Found in src_aurelia-bodylight-plugin/src/elements/markdown-it-bfootnote.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_aurelia-bodylight-plugin/src/utils/dygraph.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_aurelia-bodylight-plugin/src/elements/markdown-it-bfootnote.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                            if (pos >= max) { return false; }
                        Severity: Major
                        Found in src_aurelia-bodylight-plugin/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_aurelia-bodylight-plugin/src/utils/dygraph.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

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

                              Avoid too many return statements within this function.
                              Open

                                          return self.axes_[1][opt];
                              Severity: Major
                              Found in src_aurelia-bodylight-plugin/src/utils/dygraph.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                    if (pos + 1 >= max || state.src.charCodeAt(++pos) !== 0x3A /* : */) { return false; }
                                Severity: Major
                                Found in src_aurelia-bodylight-plugin/src/elements/markdown-it-bfootnote.js - About 30 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language