Showing 700 of 700 total issues
Function processModule
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function processModule(name, options, executeNow) {
var modifiers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
if (typeof options === 'function') {
executeNow = options;
Function needsSignature
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
function needsSignature(doclet) {
var needsSig = false;
// function and class definitions always get a signature
if (doclet.kind === 'function' || doclet.kind === 'class') {
- 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 load
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
load: function (forceReload) {
var res,
source,
self = this,
wasExpanded = this.isExpanded();
Function findNeighbourTd
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function findNeighbourTd($target, keyCode) {
var $tr,
colIdx,
$td = $target.closest("td"),
$tdNext = null;
Function nodeClick
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
nodeClick: function (ctx) {
var targetType = ctx.targetType,
tree = ctx.tree,
node = ctx.node,
event = ctx.originalEvent,
Function _makeHookContext
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_makeHookContext: function (obj, originalEvent, extra) {
var ctx, tree;
if (obj.node !== undefined) {
// obj is already a context object
if (originalEvent && obj.originalEvent !== originalEvent) {
Function option
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
option: function( key, value ) {
var options = key;
var parts;
var curOption;
var i;
Function option
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
option: function( key, value ) {
var options = key;
var parts;
var curOption;
var i;
Function option
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
option: function( key, value ) {
var options = key;
var parts;
var curOption;
var i;
Function load
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.fn.load = function( url, params, callback ) {
var selector, type, response,
self = this,
off = url.indexOf( " " );
Function pushResult
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pushResult: function pushResult(resultInfo) {
if (this !== config.current) {
var message = resultInfo && resultInfo.message || '';
var testName = this && this.testName || '';
var error = 'Assertion occurred after test finished.\n' + '> Test: ' + testName + '\n' + '> Message: ' + message + '\n';
Function chain
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function chain(has, keys) {
var ctx = {
has: has,
keys: keys
};
Function appendSuitesToHeader
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function appendSuitesToHeader(suites) {
var i,
suitesLen,
suite,
path,
Function highlight
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
highlight: function highlight(result, hOpen, hClose) {
if (typeof hOpen == 'function') return fuzzysort.highlightCallback(result, hOpen);
if (result === null) return null;
if (hOpen === undefined) hOpen = '<b>';
if (hClose === undefined) hClose = '</b>';
Function visitAndLoad
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
visitAndLoad: function (fn, includeSelf, _recursion) {
var dfd,
res,
loaders,
node = this;
Function toggleClass
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
toggleClass: function (value, flag) {
var className,
hasClass,
rnotwhite = /\S+/g,
classNames = value.match(rnotwhite) || [],
Function removeClass
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
removeClass: function( value ) {
var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0;
if ( isFunction( value ) ) {
Function editCreateNode
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.ui.fancytree._FancytreeNodeClass.prototype.editCreateNode = function (
mode,
init
) {
var newNode,
Function speed
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.speed = function( speed, easing, fn ) {
var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
complete: fn || !fn && easing ||
isFunction( speed ) && speed,
duration: speed,
Function set
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
set: function( elem, value, extra ) {
var matches,
styles = getStyles( elem ),
// Only read styles.position if the test has a chance to fail