Showing 179 of 497 total issues
File editor.js
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
YUI.add("editor", function(Y){
/**
* The WiringEditor class provides a full page interface
* @class WiringEditor
Function execute
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
execute: function(moduleId,params) {
try {
- 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 xmlParse
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xmlParse(xml) {
var regex_empty = /\/$/;
var regex_tagname;
var regex_attribute;
Function draw
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
draw: function() {
// Get the positions of the terminals
var p1 = this.terminal1.getXY();
var p2 = this.terminal2.getXY();
Function draw
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
draw: function() {
// Get the positions of the terminals
var p1 = this.terminal1.getXY();
var p2 = this.terminal2.getXY();
xpathfunctions
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
FunctionCallExpr.prototype.xpathfunctions = {
'last': function(ctx) {
assert(this.args.length == 0);
// NOTE(mesch): XPath position starts at 1.
return new NumberValue(ctx.contextSize());
Function xpathParse
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function xpathParse(expr) {
xpathLog('parse ' + expr);
xpathParseInit();
var cached = xpathCacheLookup(expr);
- 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 evaluate
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
StepExpr.prototype.evaluate = function(ctx) {
var input = ctx.node;
var nodelist = [];
var skipNodeTest = false;
File util.js
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Copyright 2005 Google
//
// Author: Steffen Meschkat <mesch@google.com>
//
// Miscellaneous utility and placeholder functions.
File wireit-app.js
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
YUI.add('wireit-app', function (Y, NAME) {
// -- LocalStorageSync ---------------------------------------------------------------------
// Saves WiringModel
File wireit-app-debug.js
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
YUI.add('wireit-app', function (Y, NAME) {
// -- LocalStorageSync ---------------------------------------------------------------------
// Saves WiringModel
Function execute
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
execute: function(moduleId,params) {
try {
Function xpathParse
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xpathParse(expr) {
xpathLog('parse ' + expr);
xpathParseInit();
var cached = xpathCacheLookup(expr);
Function xpathMatchStack
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function xpathMatchStack(stack, pattern) {
// NOTE(mesch): The stack matches for variable cardinality are
// greedy but don't do backtracking. This would be an issue only
// with rules of the form A* A, i.e. with an element with variable
- 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 loadLevel
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
loadLevel: function(level) {
Y.one('#levelContainer').innerHTML = level;
var c = level+2;
Function run
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
run: function() {
var i, j, l;
// Extract nodes positions
Function xmlTextR
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function xmlTextR(node, buf, cdata) {
if (node.nodeType == DOM_TEXT_NODE) {
buf.push(xmlEscapeText(node.nodeValue));
} else if (node.nodeType == DOM_CDATA_SECTION_NODE) {
- 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 generateFieldMap
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
generateFieldMap: function(group, usedNames, containerMap, groupMap)
{
var self = this;
var allContainers = [];
Function addWireConfig
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
addWireConfig: function(group, getInternalContainerId, getExternalTerminalName, externalWires, internalWires, groupIndex)
{
var pushUniqueWireConfig = function(wires, newWire) {
var foundWire= false;
var wire;
Function compare
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
BinaryExpr.prototype.compare = function(ctx, cmp) {
var v1 = this.expr1.evaluate(ctx);
var v2 = this.expr2.evaluate(ctx);
var ret;