Showing 621 of 1,537 total issues
File blockly.js
has 393 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @license
* Visual Blocks Editor
*
* Copyright 2011 Google Inc.
- Create a ticketCreate a ticket
File realtime.js
has 387 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @license
* Visual Blocks Editor
*
* Copyright 2014 Google Inc.
- Create a ticketCreate a ticket
Function drawMap
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
Maze.drawMap = function() {
var svg = document.getElementById('svgMaze');
var scale = Math.max(Maze.ROWS, Maze.COLS) * Maze.SQUARE_SIZE;
svg.setAttribute('viewBox', '0 0 ' + scale + ' ' + scale);
- Read upRead up
- Create a ticketCreate a ticket
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 onchange
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
onchange: function() {
if (this.getInputTargetBlock('VALUE'))
{
var nextblock = this.getInputTargetBlock('VALUE');
- Read upRead up
- Create a ticketCreate a ticket
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 drawMap
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Maze.drawMap = function() {
var svg = document.getElementById('svgMaze');
var scale = Math.max(Maze.ROWS, Maze.COLS) * Maze.SQUARE_SIZE;
svg.setAttribute('viewBox', '0 0 ' + scale + ' ' + scale);
- Create a ticketCreate a ticket
Function domToBlock
has 130 lines of code (exceeds 25 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;
- Create a ticketCreate a ticket
File stdio.js
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
goog.provide('Blockly.cake.stdio');
goog.require('Blockly.cake');
- Create a ticketCreate a ticket
File messages.js
has 381 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @license
* Visual Blocks Language
*
* Copyright 2012 Google Inc.
- Create a ticketCreate a ticket
Function getFields
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
function getFields(block) {
var fields = [];
while (block) {
if (!block.disabled && !block.getInheritedDisabled()) {
switch (block.type) {
- Read upRead up
- Create a ticketCreate a ticket
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 domToBlockObject
has 127 lines of code (exceeds 25 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;
- Create a ticketCreate a ticket
File stdio.js
has 377 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
goog.provide('Blockly.Blocks.stdio');
goog.require('Blockly.Blocks');
- Create a ticketCreate a ticket
File factory.js
has 372 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Blockly Apps: Block Factory
*
* Copyright 2012 Google Inc.
* https://blockly.googlecode.com/
- Create a ticketCreate a ticket
File no.js
has 372 lines of code (exceeds 250 allowed). Consider refactoring. Open
// This file was automatically generated. Do not modify.
'use strict';
goog.provide('Blockly.Msg.no');
- Create a ticketCreate a ticket
File az-latn.js
has 372 lines of code (exceeds 250 allowed). Consider refactoring. Open
// This file was automatically generated. Do not modify.
'use strict';
goog.provide('Blockly.Msg.az-latn');
- Create a ticketCreate a ticket
File flyout.js
has 360 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @license
* Visual Blocks Editor
*
* Copyright 2011 Google Inc.
- Create a ticketCreate a ticket
Function searchTag
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
Blockly.Blocks.searchTag = function(searchingTag){
var tree = Blockly.Toolbox.tree_;
var blocks = [];
for (var i = 0; i<tree.children_.length; i++) {
var tree_i =tree.children_[i];
- Read upRead up
- Create a ticketCreate a ticket
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 output_as_html
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
def output_as_html(messages, apps, verbose):
"""Outputs the given prefix counts and percentages as HTML.
Specifically, a sortable HTML table is produced, where the app names
are column headers, and one language is output per row. Entries
- Read upRead up
- Create a ticketCreate a ticket
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 renderCompute_
has 112 lines of code (exceeds 25 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) {
- Create a ticketCreate a ticket
Function updateLanguage
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
function updateLanguage() {
// Generate name.
var code = [];
code.push("Blockly.Blocks['" + blockType + "'] = {");
var rootBlock = getRootBlock();
- Read upRead up
- Create a ticketCreate a ticket
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 setProcedureParameters
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
setProcedureParameters: function(paramNames, paramTypes, paramDist, paramSpec, paramIds) {
// Data structures:
// this.arguments = ['x', 'y']
// Existing param names.
// this.quarkConnections_ {piua: null, f8b_: Blockly.Connection}
- Read upRead up
- Create a ticketCreate a ticket
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"