Showing 179 of 497 total issues
Function _renderInputsOutputs
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_renderInputsOutputs: function () {
this.setStdModContent(Y.WidgetStdMod.BODY, "<ul class='inputs'></ul><ul class='outputs'></ul>");
var bb = this.get('boundingBox'),
Function unGroup
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
unGroup: function()
{
if (Y.Lang.isValue(this.groupContainer))
{
this.expand();
Function Xml
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SyntaxHighlighter.brushes.Xml = function()
{
function process(match, regexInfo)
{
var constructor = SyntaxHighlighter.Match,
Function draw
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
draw: function() {
var margin = [4,4];
// Get the positions of the terminals
var p1 = this.terminal1.getXY();
Function getAndCheckOverrides
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getAndCheckOverrides: function(containerUIMap, groupUIMap)
{
var tempGroup = {};
Y.mix(tempGroup, this);
tempGroup.containers = [];
Function setupWidget
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setupWidget: function(displayDiv) {
this.display = {};
this.display.mainDiv = displayDiv;
Function replaceChild
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
XNode.prototype.replaceChild = function(newNode, oldNode) {
if (oldNode == newNode) {
return;
}
Function xpathSort
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function xpathSort(input, sort) {
if (sort.length == 0) {
return;
}
Function generateExternal
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var generateExternal = function(ftMap)
{
for (var cI in ftMap)
{
var c = ftMap[cI];
Function _onDragEditStart
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onDragEditStart: function (ev) {
// save the position
this._editwireX = ev.pageX;
this._editwireY = ev.pageY;
Function Sql
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SyntaxHighlighter.brushes.Sql = function()
{
var funcs = 'abs avg case cast coalesce convert count current_timestamp ' +
'current_user day isnull left lower month nullif replace right ' +
'session_user space substring sum system_user upper user year';
Function deserialise
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var deserialise = function(sGroup, groupToSet)
{
var group = groupToSet;
if (!Y.Lang.isValue(group))
group = new Y.Group(this.group.grouper, this.layer)
Function clearExplode
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Y.Layer.prototype.clearExplode = function(callback, bind) {
var center = [ Math.floor(Y.DOM.viewportRegion().width/2),
Math.floor(Y.DOM.viewportRegion().height/2)];
var R = 1.2*Math.sqrt( Math.pow(center[0],2)+Math.pow(center[1],2));
Function _onDragEditStart
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onDragEditStart: function (ev) {
// save the position
this._editwireX = ev.pageX;
this._editwireY = ev.pageY;
Function _onDragEditStart
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onDragEditStart: function (ev) {
// save the position
this._editwireX = ev.pageX;
this._editwireY = ev.pageY;
Function _onDragEditStart
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onDragEditStart: function (ev) {
// save the position
this._editwireX = ev.pageX;
this._editwireY = ev.pageY;
Function _onDragEditStart
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_onDragEditStart: function (ev) {
// save the position
this._editwireX = ev.pageX;
this._editwireY = ev.pageY;
Function addRemapInput
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var addRemapInput = function(name, moduleId, showOn, showCancel, defaultVisible, defaultName, visibleReadOnly, showSide, defaultSide)
Function insertBefore
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
XNode.prototype.insertBefore = function(newNode, oldNode) {
if (oldNode == newNode) {
return;
}
Function xmlValue
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
function xmlValue(node) {
if (!node) {
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"