bigdatr/bd-stampy

View on GitHub

Showing 25 of 61 total issues

Function stop has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    stop: function() {
      // Add a cross-platform `removeEventListener` shim for older browsers.
      var removeEventListener = window.removeEventListener || function (eventName, listener) {
        return detachEvent('on' + eventName, listener);
      };
Severity: Minor
Found in utils/History.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 FormMixin_validateAll has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    FormMixin_validateAll: function(formData) {
        var formErrors = {};

        formData = formData || this.state.formData;

Severity: Minor
Found in mixins/FormMixin.jsx - 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 setState has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    setState: function(params, config) {
        console.error('stampy/utils/Url.js', 'This module will be removed in a future release, use `UrlStore` instead.');

        params = params || {};

Severity: Minor
Found in utils/Url.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 paramsToQueryString has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    paramsToQueryString: function(params) {
        // Add params to an array so they can be sorted
        var paramList = [];
        for(var k in params) {
            paramList.push({key: k, value: params[k]});
Severity: Minor
Found in utils/UrlStore.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 getBodyData has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    getBodyData() {
        // 1. Filter search
        // 2. Sort direction
        // 3. Truncate to pagination

Severity: Minor
Found in components/DataTable.jsx - 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