etnbrd/flx-compiler

View on GitHub

Showing 1,229 of 1,229 total issues

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

function register(addr, fn, node) {
  if (fx[addr]) {
    fx[addr].fn = fn || fx[addr].fn;
    fx[addr].node = node || fx[addr].node;

Severity: Minor
Found in prototypes/zeromq/src/flx-router.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 Node has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function Node(node, name, id, kind, options) {
    function inspect() {
        return this.name + "(" + this.id + ")[" + this.kind + "]" + (this.version ? ("[" + this.version + "]") : "");
    }

Severity: Minor
Found in prototypes/blender/lib/constructors.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 inspect has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function inspect() {

  var that = this;

  if (Object.prototype.toString.call(this) === "[object Array]") {
Severity: Minor
Found in prototypes/shreder/lib/graphviz.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 _iterator has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function _iterator(c) {
  function handled(n) {
    if (!n.type)
      throw errors.missingType(n);

Severity: Minor
Found in prototypes/shreder/lib/transform.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 AssignmentExpression has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

_types.AssignmentExpression = function(n, c) {
  var name = n.operator;

  var ops = ['right', 'left'].map(function(op, index) {    
    var node = _next(n[op], c);
Severity: Minor
Found in prototypes/blender/lib/dependency.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 link has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function link(ctx) {
  var code = print(ctx._flx.Main.ast);

  for (var _flx in ctx._flx) { var flx = ctx._flx[_flx];
    if (flx.name !== "Main") {
Severity: Minor
Found in prototypes/shreder/index.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 worker has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function worker(id, blank, msg) {
  id = '' + id;
  var type = id[0];
  var addr = id.substring(1); //Array.prototype;
  msg = msg ? JSON.parse(msg) : undefined;
Severity: Minor
Found in prototypes/zeromq/src/old/worker.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 inspect has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function inspect() {

  var that = this;

  if (Object.prototype.toString.call(this) === "[object Array]") {
Severity: Minor
Found in prototypes/blender/lib/graphviz.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 state_machine has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

var state_machine = function(cb){
  switch(state){
    case 1: {
      if (state_cpt >= LENGTH-3) {
        state = 2;
Severity: Minor
Found in prototypes/fluxions/bench/distribution/setTimeout.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