Showing 179 of 497 total issues
Function generateFields
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
generateFields: function(fieldConfigs, overrides, external)
{
var fields = [];
var neededFields = [];
var terminalNamesUsed = [];
Function CSS
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
SyntaxHighlighter.brushes.CSS = function()
{
function getKeywordsCSS(str)
{
return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
Function addRemapInput
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
var addRemapInput = function(name, moduleId, showOn, showCancel, defaultVisible, defaultName, visibleReadOnly, showSide, defaultSide)
{
var addTds = function(row) {
tds = [];
Function _drawArrow
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
_drawArrow: function(src, tgt) {
var d = 7, // arrow width/2
distance = Math.sqrt(Math.pow(src[0]-tgt[0],2) + Math.pow(src[1]-tgt[1],2)),
Function _drawArrow
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
_drawArrow: function(src, tgt) {
var d = 7, // arrow width/2
distance = Math.sqrt(Math.pow(src[0]-tgt[0],2) + Math.pow(src[1]-tgt[1],2)),
Function _drawArrow
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
_drawArrow: function(src, tgt) {
var d = 7, // arrow width/2
distance = Math.sqrt(Math.pow(src[0]-tgt[0],2) + Math.pow(src[1]-tgt[1],2)),
Function _drawArrow
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
_drawArrow: function(src, tgt) {
var d = 7, // arrow width/2
distance = Math.sqrt(Math.pow(src[0]-tgt[0],2) + Math.pow(src[1]-tgt[1],2)),
Function _drawArrow
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
_drawArrow: function(src, tgt) {
var d = 7, // arrow width/2
distance = Math.sqrt(Math.pow(src[0]-tgt[0],2) + Math.pow(src[1]-tgt[1],2)),
Function saveWiring
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
saveWiring: function (e) {
var o = {
name: Y.one('#wiring-name').get('value') || 'Unnamed'
};
Function saveWiring
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
saveWiring: function (e) {
var o = {
name: Y.one('#wiring-name').get('value') || 'Unnamed'
};
Function saveWiring
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
saveWiring: function (e) {
var o = {
name: Y.one('#wiring-name').get('value') || 'Unnamed'
};
Function saveWiring
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
saveWiring: function (e) {
var o = {
name: Y.one('#wiring-name').get('value') || 'Unnamed'
};
Function saveWiring
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
saveWiring: function (e) {
var o = {
name: Y.one('#wiring-name').get('value') || 'Unnamed'
};
Function xpathReduce
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xpathReduce(stack, ahead) {
var cand = null;
if (stack.length > 0) {
var top = stack[stack.length-1];
Function loadPipe
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
loadPipe: function(name) {
if(!this.isSaved()) {
if( !confirm("Warning: Your work is not saved yet ! Press ok to continue anyway.") ) {
return;
Function getCollapsedConfig
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
getCollapsedConfig: function(group, map)
{
if (!Y.Lang.isObject(map))
map = Y.GroupUtils.getMap(group);
Function renderLayer
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderLayer: function() {
console.log("rendering Layer !!");
this.layer = new Y.Layer({
Function parseData
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
var parseData = function(name, data, file) {
var i, o;
for (i in data) {
if (i === 'submodules' || i === 'plugins') {
for (o in data[i]) {
- 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 xpathParseInit
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function xpathParseInit() {
if (xpathRules.length) {
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 _combineSteps
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
LocationExpr.prototype._combineSteps = function(prevStep, nextStep) {
if (!prevStep) return null;
if (!nextStep) return null;
var hasPredicates = (prevStep.predicates && prevStep.predicates.length > 0);
if (prevStep.nodetest instanceof NodeTestAny && !hasPredicates) {
- 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"