Showing 650 of 650 total issues
Avoid deeply nested control flow statements. Open
Open
if (properties.length) {
mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc));
properties = [];
}
Avoid deeply nested control flow statements. Open
Open
if (isText(next)) {
if (!currentContainer) {
currentContainer = children[i] = {
type: 8 /* COMPOUND_EXPRESSION */,
loc: child.loc,
Avoid deeply nested control flow statements. Open
Open
else if (shapeFlag & 128 /* SUSPENSE */) {
nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
}
else {
warn('Invalid HostVNode type:', type, `(${typeof type})`);
Avoid deeply nested control flow statements. Open
Open
if (contentType < 3 /* CAN_STRINGIFY */) {
canStringify = false;
}
Avoid deeply nested control flow statements. Open
Open
else if (s[1] === '/') {
// https://html.spec.whatwg.org/multipage/parsing.html#end-tag-open-state
if (s.length === 2) {
emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 2);
}
Avoid deeply nested control flow statements. Open
Open
if (value !== attrs[key]) {
attrs[key] = value;
hasAttrsChanged = true;
}
Avoid deeply nested control flow statements. Open
Open
if (existing !== incoming) {
ret[key] = existing
? [].concat(existing, incoming)
: incoming;
}
Avoid deeply nested control flow statements. Open
Open
if (prop) {
const booleanIndex = getTypeIndex(Boolean, prop.type);
const stringIndex = getTypeIndex(String, prop.type);
prop[0 /* shouldCast */] = booleanIndex > -1;
prop[1 /* shouldCastTrue */] =
Avoid deeply nested control flow statements. Open
Open
if (!isReservedProp(key) && isOn(key)) {
patchProp(el, key, null, props[key]);
}
Avoid deeply nested control flow statements. Open
Open
else if (key !== '') {
ret[key] = toMerge[key];
}
Avoid deeply nested control flow statements. Open
Open
if (next !== prev ||
(hostForcePatchProp && hostForcePatchProp(el, key))) {
hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren);
}
Avoid deeply nested control flow statements. Open
Open
if (isSameKey(userKey, key)) {
context.onError(createCompilerError(28 /* X_V_IF_SAME_KEY */, branch.userKey.loc));
}
Avoid deeply nested control flow statements. Open
Open
if (isKeyboardEvent(key.content)) {
keyModifiers.push(modifier);
}
else {
nonKeyModifiers.push(modifier);
Avoid deeply nested control flow statements. Open
Open
if (end > count) {
const length = Math.max(Math.min(end - count, lineLength), 1);
res.push(` | ` + '^'.repeat(length));
}
Avoid deeply nested control flow statements. Open
Open
if ((!flag ||
flag === 512 /* NEED_PATCH */ ||
flag === 1 /* TEXT */) &&
getGeneratedPropsConstantType(child, context) >=
2 /* CAN_HOIST */) {
Avoid deeply nested control flow statements. Open
Open
if (extraAttrs.length) {
warn(`Extraneous non-props attributes (` +
`${extraAttrs.join(', ')}) ` +
`were passed to component but could not be automatically inherited ` +
`because component renders fragment or text root nodes.`);
Avoid deeply nested control flow statements. Open
Open
if (code < 48 || code > maxCode) return NaN;
Avoid deeply nested control flow statements. Open
Open
} else if (IS_EVERY) return false; // every
Function cherrydoor
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def cherrydoor():
"""Run the server."""
parser = argparse.ArgumentParser(
prog="cherrydoor", description="Cherrydoor management"
)
- 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
else if (result) switch (TYPE) {
case 3: return true; // some
case 5: return value; // find
case 6: return index; // findIndex
case 2: push.call(target, value); // filter