Showing 697 of 1,371 total issues
File widget-scroller.js
has 701 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! Widget: scroller - updated 5/17/2015 (v2.22.0) *//*
Copyright (C) 2011 T. Connell & Associates, Inc.
Dual-licensed under the MIT and GPL licenses
Consider simplifying this complex logical expression. Open
if (params.opacity != null ||
params["stroke-width"] != null ||
params.fill != null ||
params.src != null ||
params.stroke != null ||
Function generate_decor
has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring. Open
def generate_decor(path, num_tiles):
DECOR_DATA = decor_data()
DECOR_SUM = decor_sum()
def find_node_by_coordinate(x, y, dec, nodes):
- Read upRead up
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 Orbit
has 257 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Orbit = function (el, settings) {
// Don't reinitialize plugin
if (el.hasClass(settings.slides_container_class)) {
return this;
}
Function setFillAndStroke
has 253 lines of code (exceeds 25 allowed). Consider refactoring. Open
setFillAndStroke = function (o, params) {
var node = o.node,
attrs = o.attrs,
vis = node.style.visibility;
node.style.visibility = "hidden";
Function add_and_reorder_levels
has 252 lines of code (exceeds 25 allowed). Consider refactoring. Open
def add_and_reorder_levels(apps, schema_editor):
Level = apps.get_model("game", "Level")
Character = apps.get_model("game", "Character")
Theme = apps.get_model("game", "Theme")
File blocklyCustomBlocks.js
has 560 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
var ocargo = ocargo || {};
var Blockly = Blockly || {};
File blocklyCompiler.js
has 556 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
var ocargo = ocargo || {};
ocargo.BlocklyCompiler = function () {};
Function setupTrafficLightListeners
has 213 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setupTrafficLightListeners(trafficLight) {
var image = trafficLight.image;
// Position in map coordinates.
var sourceCoord;
Function setFillAndStroke
has 212 lines of code (exceeds 25 allowed). Consider refactoring. Open
setFillAndStroke = function (o, params) {
// o.paper.canvas.style.display = "none";
o.attrs = o.attrs || {};
var node = o.node,
a = o.attrs,
Function student_row
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
def student_row(levels_sorted, student, best_attempts):
threshold = 0.5
num_all = num_finished = num_attempted = num_started = 0
total_score = 0
- Read upRead up
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 add_levels
has 203 lines of code (exceeds 25 allowed). Consider refactoring. Open
def add_levels(apps, schema_editor):
Level = apps.get_model("game", "Level")
Theme = apps.get_model("game", "Theme")
Character = apps.get_model("game", "Character")
Function performAnimation
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
ocargo.Animation.prototype.performAnimation = function(animation) {
// Duration is either custom set (for each element) or generic
var duration = animation.animationLength || this.animationDuration;
switch (animation.type) {
- Read upRead up
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 model.js
has 493 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var ocargo = ocargo || {};
ocargo.Model = function(nodeData, origin, destinations, trafficLightData, cowData, maxFuel) {
Function runAnimation
has 194 lines of code (exceeds 25 allowed). Consider refactoring. Open
function runAnimation(anim, element, percent, status, totalOrigin, times) {
percent = toFloat(percent);
var params,
isInAnim,
isInAnimSet,
Function BlocklyCustomisations
has 192 lines of code (exceeds 25 allowed). Consider refactoring. Open
ocargo.BlocklyCustomisations = function () {
const TOOLBOX_REMAINING_CAPACITY_TEXT_COLUMN_WIDTH = 50;
const QUANTITY_TEXT_OFFSET = 35;
File en-gb.js
has 474 lines of code (exceeds 250 allowed). Consider refactoring. Open
// This file was automatically generated. Do not modify.
'use strict';
goog.provide('Blockly.Msg.en.gb');
File hi.js
has 474 lines of code (exceeds 250 allowed). Consider refactoring. Open
// This file was automatically generated. Do not modify.
'use strict';
goog.provide('Blockly.Msg.hi');
File fr.js
has 474 lines of code (exceeds 250 allowed). Consider refactoring. Open
// This file was automatically generated. Do not modify.
'use strict';
goog.provide('Blockly.Msg.fr');
File en.js
has 474 lines of code (exceeds 250 allowed). Consider refactoring. Open
// This file was automatically generated. Do not modify.
'use strict';
goog.provide('Blockly.Msg.en');