Showing 179 of 497 total issues
Function getMap
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
getMap: function(group)
{
//assume no group container case
if (Y.Lang.isValue(group.groupContainer))
Function generateTerminals
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
generateTerminals: function(terminalConfigs, overrides, external, usedNames)
{
var terminals = [];
var visibleTerminals = [];
for (var mI in terminalConfigs)
Function mayEval
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
mayEval: function(moduleId) {
var t = this.wiringConfig.working.modules[moduleId].name;
//console.log("mayEval", this.wiringConfig.working.modules[moduleId]);
- 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 xsltCopyOf
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function xsltCopyOf(dst, src, dstDocument) {
if (src.nodeType == DOM_DOCUMENT_FRAGMENT_NODE ||
src.nodeType == DOM_DOCUMENT_NODE) {
for (var i = 0; i < src.childNodes.length; ++i) {
arguments.callee(dst, src.childNodes[i], dstDocument);
- 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 LocalStorageSync
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function LocalStorageSync(key) {
var localStorage;
if (!key) {
Y.error('No storage key specified.');
- 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 mayEval
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
mayEval: function(moduleId) {
var t = this.wiringConfig.working.modules[moduleId].name;
//console.log("mayEval", this.wiringConfig.working.modules[moduleId]);
- 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 xpathGrammarPrecedence
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function xpathGrammarPrecedence(frame) {
var ret = 0;
if (frame.rule) { /* normal reduce */
if (frame.rule.length >= 3 && frame.rule[2] >= 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 xmlResolveEntities
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xmlResolveEntities(s) {
var parts = stringSplit(s, '&');
var ret = parts[0];
Function workOutCenter
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
workOutCenter: function(group)
{
var bounds = {};
var setBound = function(position)
Function insertBefore
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
XNode.prototype.insertBefore = function(newNode, oldNode) {
if (oldNode == newNode) {
return;
}
- 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 xsltMatch
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function xsltMatch(match, context) {
var expr = xpathParse(match);
var ret;
// Shortcut for the most common case.
- 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 domTraverseElements
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function domTraverseElements(node, opt_pre, opt_post) {
var ret;
if (opt_pre) {
ret = opt_pre.call(null, node);
if (typeof ret == 'boolean' && !ret) {
- 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 getExternalToInternalMap
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
getExternalToInternalMap: function(map)
{
var containerMap = {"fields" : {}, "terminals" : {}};
var groupMap = {"fields" : {}, "terminals" : {}};
Function addWiresForContainer
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
var addWiresForContainer = function(c, getExternalName)
{
for (var wI in c.wires)
{
var w = c.wires[wI];
Function setOptions
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
setOptions: function(options) {
Y.WireWiringEditor.superclass.setOptions.call(this, options);
// Load the modules from options
Function _renderInputsOutputs
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderInputsOutputs: function () {
this.setStdModContent(Y.WidgetStdMod.BODY, "<ul class='inputs'></ul><ul class='outputs'></ul>");
var bb = this.get('boundingBox'),
Function xmlTextR
has 34 lines of code (exceeds 25 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) {
Function _renderInputsOutputs
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderInputsOutputs: function () {
this.setStdModContent(Y.WidgetStdMod.BODY, "<ul class='inputs'></ul><ul class='outputs'></ul>");
var bb = this.get('boundingBox'),
Function _renderInputsOutputs
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderInputsOutputs: function () {
this.setStdModContent(Y.WidgetStdMod.BODY, "<ul class='inputs'></ul><ul class='outputs'></ul>");
var bb = this.get('boundingBox'),
Function _renderInputsOutputs
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
_renderInputsOutputs: function () {
this.setStdModContent(Y.WidgetStdMod.BODY, "<ul class='inputs'></ul><ul class='outputs'></ul>");
var bb = this.get('boundingBox'),