Showing 1,485 of 3,294 total issues
Function _createTagInfo
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function _createTagInfo(token, tokenType, offset, exclusionList, tagName, attrName, shouldReplace) {
Function access
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
Function update
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
HashCollisionNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
Function update
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
HashArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
Function makeList
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function makeList(origin, capacity, level, root, tail, ownerID, hash) {
Function update
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ArrayMapNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
Function update
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
BitmapIndexedNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
Function update
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ValueNode.prototype.update = function(ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {
Avoid deeply nested control flow statements. Open
Open
if (sel.end.line === totalLines - 1) {
nextText += "\n";
}
Avoid deeply nested control flow statements. Open
Open
if (text.indexOf(",") >= (offset - lastEnd)) {
// comma is after the offset so the current arg is the
// previous arg node.
i--;
} else if (i === 0 && text.indexOf("(") !== -1) {
Avoid deeply nested control flow statements. Open
Open
} else if (i + 1 === n) {
// look for a comma after the node.end. This will tell us we
// are on the next argument, even there is no text, and therefore no node,
// for the next argument.
text = fragment.substring(node.end, offset);
Function _cmdInstall
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function _cmdInstall(packagePath, destinationDirectory, options, callback, pCallback, _doUpdate) {
Function _isPrevTokenABlockComment
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function _isPrevTokenABlockComment(ctx, prefix, suffix, prefixExp, suffixExp, lineExp) {
Avoid deeply nested control flow statements. Open
Open
} else if (token.type === "attribname") {
attributeName = token.contents.toLowerCase();
// Set the value to the empty string in case this is an empty attribute. If it's not,
// it will get overwritten by the attribvalue later.
this.currentTag.attributes[attributeName] = "";
Avoid deeply nested control flow statements. Open
Open
if (token.type === "selfclosingtag" && stack.length && stack[stack.length - 1] === this.currentTag) {
// This must have been a self-closing tag that we didn't identify as a void element
// (e.g. an SVG tag). Pop it off the stack as if we had encountered its close tag.
closeTag(token.end, token.endPos);
} else {
Function ConsoleAgent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
define(function ConsoleAgent(require, exports, module) {
"use strict";
var Inspector = require("LiveDevelopment/Inspector/Inspector");
- 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
Avoid deeply nested control flow statements. Open
Open
if (!voidElements.hasOwnProperty(closeTagName)) {
// Find the topmost item on the stack that matches. If we can't find one, assume
// this is just a dangling closing tag and ignore it.
var i;
for (i = stack.length - 1; i >= 0; i--) {
Avoid deeply nested control flow statements. Open
Open
if (param.value < 0) {
match[i] = "0";
} else if (param.value > 1) {
match[i] = "1";
}
Function isOver
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
isOver: function( y, x, top, left, height, width ) {
Avoid deeply nested control flow statements. Open
Open
if (currentDeferred && currentDeferred.state() === "pending") {
currentDeferred.reject();
}