Showing 20 of 43 total issues

Function e3Extent has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

export function e3Extent(params, hash) {
  let arr = params[0];

  if(!arr) {
    return [-Infinity, Infinity];
Severity: Minor
Found in addon/helpers/e3-extent.js - About 2 hrs 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 d3_svg_lineHermite has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function d3_svg_lineHermite(points, tangents) {
  if (tangents.length < 1 || (points.length !== tangents.length && points.length !== tangents.length + 2)) {
    return points;
  }

Severity: Major
Found in addon/utils/shadow/line-interpolation/monotone.js - About 2 hrs to fix

    Function e3Extent has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function e3Extent(params, hash) {
      let arr = params[0];
    
      if(!arr) {
        return [-Infinity, Infinity];
    Severity: Major
    Found in addon/helpers/e3-extent.js - About 2 hrs to fix

      Function shadowScalesOrdinal has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function shadowScalesOrdinal(range = [0,1], domain = [0,1], options = {}) {
        let {banding, outerPadding, padding, sort} = options;
        let spaceBetween = 0;
        let [r0, r1] = range;
      
      
      Severity: Minor
      Found in addon/utils/shadow/scales/ordinal.js - About 1 hr to fix

        Function processIterableComponent has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          processIterableComponent(componentItem, iterableGuids, iterableMap) {
            let {component, children, dataState} = componentItem;
            let {enter, exit, active} = calculateChanges(dataState, iterableGuids);
            let type = this.getType();
            componentItem.dataState = active;
        Severity: Minor
        Found in addon/components/e3-collection.js - About 1 hr to fix

          Function d3_svg_lineMonotoneTangents has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function d3_svg_lineMonotoneTangents(points) {
            var tangents = [],
                d,
                a,
                b,
          Severity: Minor
          Found in addon/utils/shadow/line-interpolation/monotone.js - About 1 hr to fix

            Function generateState has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              generateState(stateName, dataContext = null) {
                let activeState = get(this, 'activeState');
            
                let data = dataContext || this.getDataContext();
                let attrs = this.get('attrs');
            Severity: Minor
            Found in addon/mixins/e3-animated-child.js - About 1 hr to fix

              Function e3BindScale has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

              export function e3BindScale(params, options) {
                let {scaleDifference, data:manualData} = options;
                let [scale, key] = params;
              
                if(scale) {
              Severity: Minor
              Found in addon/helpers/e3-bind-scale.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 d3_svg_lineMonotoneTangents has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

              function d3_svg_lineMonotoneTangents(points) {
                var tangents = [],
                    d,
                    a,
                    b,
              Severity: Minor
              Found in addon/utils/shadow/line-interpolation/monotone.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 range has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

              function range(start, stop, step) {
                if (arguments.length < 3) {
                  step = 1;
                  if (arguments.length < 2) {
                    stop = start;
              Severity: Minor
              Found in addon/utils/e3-ticks.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 e3CalculateChanges has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function e3CalculateChanges(previousArr, newArr) {
                let toRemove = Object.create(null);
                let additions = [];
                let updates = [];
                let removals = [];
              Severity: Minor
              Found in addon/utils/e3-calculate-changes.js - About 1 hr to fix

                Function shadowScalesOrdinal has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                export default function shadowScalesOrdinal(range = [0,1], domain = [0,1], options = {}) {
                  let {banding, outerPadding, padding, sort} = options;
                  let spaceBetween = 0;
                  let [r0, r1] = range;
                
                
                Severity: Minor
                Found in addon/utils/shadow/scales/ordinal.js - About 55 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 pathFromCommands has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                export default function pathFromCommands(commands) {
                  let svgCommands = commands.map((command, i) => {
                    let name = '';
                    if (command.length === 2) {
                      name = i === 0 ? 'M' : 'L';
                Severity: Minor
                Found in addon/utils/shadow/types/svg/path-from-commands.js - About 55 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 mouseMoveEvents has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                function mouseMoveEvents(current, previous) {
                  /*
                    - #if mouseDownEvent
                      - dispatch drag on prevMouseDownEvent.setTarget
                      - Copy the mouseDownEvent from prev to current
                Severity: Minor
                Found in addon/utils/shadow/event.js - About 45 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 render has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  render(parentContext, type, parentMatrix, cumMatrix, event) {
                Severity: Minor
                Found in addon/utils/shadow/renderable.js - About 35 mins to fix

                  Function render has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    render(parentContext, type, attrs, parentMatrix, event) {
                  Severity: Minor
                  Found in addon/utils/shadow/group.js - About 35 mins to fix

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

                    function interpolateHash(hashA, hashB, percent) {
                      let resHash = {};
                      let key;
                    
                      // First, interpolate all the keys from hash A.
                    Severity: Minor
                    Found in addon/utils/e3-interpolate.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 d3_svg_lineHermite has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function d3_svg_lineHermite(points, tangents) {
                      if (tangents.length < 1 || (points.length !== tangents.length && points.length !== tangents.length + 2)) {
                        return points;
                      }
                    
                    
                    Severity: Minor
                    Found in addon/utils/shadow/line-interpolation/monotone.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 e3ScaleMax has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export function e3ScaleMax(params, options = {}) {
                      let [scale] = params;
                      let {minus, add} = options;
                      if(scale && scale.range) {
                        let maxValue = max.apply(null, scale.range);
                    Severity: Minor
                    Found in addon/helpers/e3-scale-max.js - About 25 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 e3ScaleMin has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export function e3ScaleMin(params, options) {
                      let [scale] = params;
                      let {minus, add} = options;
                      if(scale && scale.range) {
                        let minValue = min.apply(null, scale.range);
                    Severity: Minor
                    Found in addon/helpers/e3-scale-min.js - About 25 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

                    Severity
                    Category
                    Status
                    Source
                    Language