Showing 460 of 700 total issues
Function publish
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
exports.publish = function(taffyData, opts, tutorials) {
var classes;
var conf;
var externals;
var files;
- 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 normalizeDragEnterResponse
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function normalizeDragEnterResponse(r) {
var res;
if (!r) {
return false;
Function _makeVirtualFunction
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _makeVirtualFunction(methodName, tree, base, extension, extName) {
// $.ui.fancytree.debug("_makeVirtualFunction", methodName, tree, base, extension, extName);
// if(rexTestSuper && !rexTestSuper.test(func)){
// // extension.methodName() doesn't call _super(), so no wrapper required
// return func;
Function getDimensions
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getDimensions( elem ) {
var raw = elem[ 0 ];
if ( raw.nodeType === 9 ) {
return {
width: elem.width(),
Function getDimensions
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getDimensions( elem ) {
var raw = elem[ 0 ];
if ( raw.nodeType === 9 ) {
return {
width: elem.width(),
Function getDimensions
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getDimensions( elem ) {
var raw = elem[ 0 ];
if ( raw.nodeType === 9 ) {
return {
width: elem.width(),
Function when
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
when: function( singleValue ) {
var
// count of uncompleted subordinates
remaining = arguments.length,
Function propFilter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function propFilter( props, specialEasing ) {
var index, name, easing, value, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
Function logHook
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function logHook(name, this_, args, extra) {
var res,
ctx = args[0],
opts = ctx.options.logger,
obj = ctx.node || ctx.tree,
Function postProcess
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
postProcess: function (event, data) {
var response = data.response;
data.node.info("search postProcess", response);
data.result = $.map(response.results, function (o) {
Function clone
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
var i, l, srcElements, destElements,
clone = elem.cloneNode( true ),
inPage = isAttached( elem );
Function renderColumns
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderColumns: function (event, data) {
var i,
node = data.node,
$tdList = $(node.tr).find(">td"),
cnList = node.data.vernacularNames
Function addClass
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addClass: function( value ) {
var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0;
if ( isFunction( value ) ) {
Function exportQUnit
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function exportQUnit(QUnit) {
var exportedModule = false;
if (window$1 && document) {
// QUnit may be defined when it is preconfigured but then only QUnit and QUnit.config may be defined.
Function position
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
position: function() {
if ( !this[ 0 ] ) {
return;
}
Function queueHook
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
queueHook: function queueHook(hook, hookName, hookOwner) {
var _this3 = this;
var callHook = function callHook() {
var promise = hook.call(_this3.testEnvironment, _this3.assert);
Function objectType
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function objectType(obj) {
if (typeof obj === 'undefined') {
return 'undefined';
} // Consider: typeof null === object
Function simulateDrag
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
simulateDrag: function() {
var i = 0,
target = this.target,
eventDoc = target.ownerDocument,
options = this.options,
Function findNextNode
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
findNextNode: function (match, startNode) {
//, visibleOnly) {
var res = null,
firstNode = this.getFirstChild();
Function applyPatch
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
applyPatch: function (patchList) {
var dfd,
i,
p2,
key,