cra16/cake-core

View on GitHub

Showing 621 of 1,537 total issues

File bootstrap.js has 1387 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Bootstrap v3.2.0 (http://getbootstrap.com)
 * Copyright 2011-2014 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
Severity: Major
Found in js/bootstrap.js - About 3 days to fix

File block.js has 1173 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * @license
 * Visual Blocks Editor
 *
 * Copyright 2011 Google Inc.
Severity: Major
Found in core/block.js - About 3 days to fix

File maze.js has 1163 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Blockly Apps: Maze
 *
 * Copyright 2012 Google Inc.
 * https://blockly.googlecode.com/
Severity: Major
Found in blockly/apps/maze/maze.js - About 2 days to fix

Function renderDrawRight_ has a Cognitive Complexity of 126 (exceeds 5 allowed). Consider refactoring.
Open

Blockly.BlockSvg.prototype.renderDrawRight_ = function(steps, highlightSteps,
    inlineSteps, highlightInlineSteps, connectionsXY, inputRows, iconWidth) {
  var cursorX;
  var cursorY = 0;
  var connectionX, connectionY;
Severity: Minor
Found in core/block_svg.js - About 2 days 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

File soyutils.js has 1011 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright 2008 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
Severity: Major
Found in blockly/apps/_soy/soyutils.js - About 2 days to fix

File procedures.js has 982 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * @license
 * Visual Blocks Editor
 *
 * Copyright 2012 Google Inc.
Severity: Major
Found in blocks/procedures.js - About 2 days to fix

Function levelHelp has a Cognitive Complexity of 119 (exceeds 5 allowed). Consider refactoring.
Open

Maze.levelHelp = function() {
  if (Blockly.Block.dragMode_ != 0) {
    // Don't change helps during drags.
    return;
  } else if (Maze.result == Maze.ResultType.SUCCESS) {
Severity: Minor
Found in blockly/apps/maze/maze.js - About 2 days 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 createDom_ has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
Open

Blockly.createDom_ = function(container) {
  // Sadly browsers (Chrome vs Firefox) are currently inconsistent in laying
  // out content in RTL mode.  Therefore Blockly forces the use of LTR,
  // then manually positions content in RTL as needed.
  container.setAttribute('dir', 'LTR');
Severity: Minor
Found in core/inject.js - About 1 day 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

File block_svg.js has 745 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * @license
 * Visual Blocks Editor
 *
 * Copyright 2012 Google Inc.
Severity: Major
Found in core/block_svg.js - About 1 day to fix

File variables.js has 737 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * @license
 * Visual Blocks Editor
 *
 * Copyright 2012 Google Inc.
Severity: Major
Found in blocks/variables.js - About 1 day to fix

File en.js has 609 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// This file was automatically generated.  Do not modify.

'use strict';

goog.provide('Blockly.Msg.en');
Severity: Major
Found in msg/js/en.js - About 1 day to fix

File ko.js has 608 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// This file was automatically generated.  Do not modify.

'use strict';

goog.provide('Blockly.Msg.ko');
Severity: Major
Found in msg/js/ko.js - About 1 day to fix

File blocks.js has 580 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Blockly Apps: Block Factory Blocks
 *
 * Copyright 2012 Google Inc.
 * https://blockly.googlecode.com/
Severity: Major
Found in blockly/apps/blockfactory/blocks.js - About 1 day to fix

Function domToBlockObject has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
Open

Blockly.Xml.domToBlockObject = function(workspace, xmlBlock, opt_reuseBlock) {
    var block = null;
    var prototypeName = xmlBlock.getAttribute('type');
    if (!prototypeName) {
        throw 'Block type unspecified: \n' + xmlBlock.outerHTML;
Severity: Minor
Found in core/xml.js - About 1 day 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 domToBlock has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
Open

Blockly.Xml.domToBlock = function(workspace, xmlBlock, opt_reuseBlock) {
  var block = null;
  var prototypeName = xmlBlock.getAttribute('type');
  if (!prototypeName) {
    throw 'Block type unspecified: \n' + xmlBlock.outerHTML;
Severity: Minor
Found in core/xml.js - About 1 day 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

File common.js has 554 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Blockly Apps: Common code
 *
 * Copyright 2013 Google Inc.
 * https://blockly.googlecode.com/
Severity: Major
Found in blockly/apps/common.js - About 1 day to fix

Function renderCompute_ has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
Open

Blockly.BlockSvg.prototype.renderCompute_ = function(iconWidth) {
  var inputList = this.block_.inputList;
  var inputRows = [];
  inputRows.rightEdge = iconWidth + Blockly.BlockSvg.SEP_SPACE_X * 2;
  if (this.block_.previousConnection || this.block_.nextConnection) {
Severity: Minor
Found in core/block_svg.js - About 1 day 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 renderDrawRight_ has 230 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Blockly.BlockSvg.prototype.renderDrawRight_ = function(steps, highlightSteps,
    inlineSteps, highlightInlineSteps, connectionsXY, inputRows, iconWidth) {
  var cursorX;
  var cursorY = 0;
  var connectionX, connectionY;
Severity: Major
Found in core/block_svg.js - About 1 day to fix

Function connect has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
Open

Blockly.Connection.prototype.connect = function(otherConnection) {
  if (this.sourceBlock_ == otherConnection.sourceBlock_) {
    throw 'Attempted to connect a block to itself.';
  }
  if (this.sourceBlock_.workspace !== otherConnection.sourceBlock_.workspace) {
Severity: Minor
Found in core/connection.js - About 1 day 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 saveAs has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
Open

  || (function(view) {
    "use strict";
    // IE <10 is explicitly unsupported
    if (typeof navigator !== "undefined" &&
        /MSIE [1-9]\./.test(navigator.userAgent)) {
Severity: Minor
Found in js/FileSaver.js - About 1 day 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