Showing 340 of 6,870 total issues
Function Canvas2Image
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Canvas2Image = function () {
// check if support sth.
var $support = function () {
var canvas = document.createElement('canvas'),
Function __module7__
has 174 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __module7__ = (function(__dependency1__) {
"use strict";
var __exports__;
var Exception = __dependency1__;
Function setupCanvas
has 170 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.setupCanvas = function() {
var context = {
divElementId: panel.divElement.id
};
$(divElement).html(JST["views/taxonomyPlugin/main.hbs"](context));
Function loadMembers
has 165 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.loadMembers = function(conceptId, term, returnLimit, skipTo, paginate) {
var branch = options.edition;
if(options.release.length > 0 && options.release !== 'None'){
branch = branch + "/" + options.release;
};
Function drawConceptDiagram
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
Open
function drawConceptDiagram (concept, div, options, panel) {
var getDefautTermForRelationShip = function (concept) {
if(concept.pt.lang === options.defaultLanguage && options.defaultLanguage != 'en' && concept.fsn.lang != options.defaultLanguage){
return concept.pt.term;
- 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 splitter
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.splitter = function(args){
args = args || {};
return this.each(function() {
var zombie; // left-behind splitbar for outline resizes
function startSplitMouse(evt) {
Function __module2__
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __module2__ = (function(__dependency1__, __dependency2__) {
"use strict";
var __exports__ = {};
var Utils = __dependency1__;
var Exception = __dependency2__;
Function loadMembers
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.loadMembers = function(returnLimit, skipTo, paginate) {
var branch = options.edition;
if(options.release.length > 0 && options.release !== 'None'){
branch = branch + "/" + options.release;
};
Function setupCanvas
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.setupCanvas = function() {
panel.attributesPId = panel.divElement.id + "-attributes-panel";
panel.descsPId = panel.divElement.id + "-descriptions-panel";
panel.relsPId = panel.divElement.id + "-rels-panel";
panel.childrenPId = panel.divElement.id + "-children-panel";
File drawConceptDiagram.js
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
function drawConceptDiagram (concept, div, options, panel) {
var getDefautTermForRelationShip = function (concept) {
if(concept.pt.lang === options.defaultLanguage && options.defaultLanguage != 'en' && concept.fsn.lang != options.defaultLanguage){
return concept.pt.term;
Function exportToConstraintGrammar
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.exportToConstraintGrammar = function(htmlFormat, fullSyntax, htmlObj, fullObjHtml) {
var breakLine = " ";
if (htmlFormat) {
breakLine = "<br>";
}
Function setupParents
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.setupParents = function(parents, focusConcept) {
console.log(focusConcept);
var lastParent;
$.each(parents, function(i, parent) {
lastParent = parent;
Function baseIsEqual
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function baseIsEqual(a, b, callback, isWhere, stackA, stackB) {
// used to indicate that when comparing objects, `a` has at least the properties of `b`
if (callback) {
var result = callback(a, b);
if (typeof result != 'undefined') {
Function _preprocessEvent
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var _preprocessEvent = function(event) {
var element = event.target || _currentElement || null;
var sourceIsSwf = event._source === "swf";
delete event._source;
var flashErrorNames = [ "flash-disabled", "flash-outdated", "flash-unavailable", "flash-deactivated", "flash-overdue" ];
Function __module6__
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var __module6__ = (function(__dependency1__, __dependency2__, __dependency3__) {
"use strict";
var __exports__ = {};
var Utils = __dependency1__;
var Exception = __dependency2__;
Function border
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jLayout.border = function (spec) {
var my = {},
that = {},
east = spec.east,
west = spec.west,
Function exports
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
Function getChildren
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.getChildren = function(conceptId) {
if (typeof panel.options.selectedView == "undefined") {
panel.options.selectedView = "inferred";
}
Function parse
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parse: function parse(input) {
var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
this.lexer.setInput(input);
this.lexer.yy = this.yy;
this.yy.lexer = this.lexer;
Function wrapInParents
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.wrapInParents = function(conceptId, liItem) {
var topUl = $("#" + panel.divElement.id + "-panelBody").find('ul:first');
var branch = options.edition;
if(options.release.length > 0 && options.release !== 'None'){
branch = branch + "/" + options.release;