oplik0/cherrydoor

View on GitHub

Showing 650 of 650 total issues

Function getChildRoot has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

const getChildRoot = (vnode) => {
    const rawChildren = vnode.children;
    const dynamicChildren = vnode.dynamicChildren;
    const childRoot = filterSingleRoot(rawChildren);
    if (!childRoot) {
Severity: Minor
Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

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 genAssets has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

function genAssets(assets, type, { helper, push, newline }) {
    const resolver = helper(type === 'component'
                    ? RESOLVE_COMPONENT
                    : RESOLVE_DIRECTIVE);
    for (let i = 0; i < assets.length; i++) {
Severity: Minor
Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

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 genObjectExpression has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

function genObjectExpression(node, context) {
    const { push, indent, deindent, newline } = context;
    const { properties } = node;
    if (!properties.length) {
            push(`{}`, node);
Severity: Minor
Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

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 _createVNode has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
Severity: Minor
Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                    if (re !== BASE_PARAM_PATTERN) {
                        subSegmentScore += 10 /* BonusCustomRegExp */;
                        // make sure the regexp is valid before using it
                        try {
                            new RegExp(`(${re})`);
    Severity: Major
    Found in cherrydoor/static/js/vue-router.js - About 45 mins to fix

      Function setVarsOnVNode has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      function setVarsOnVNode(vnode, vars) {
          if (vnode.shapeFlag & 128 /* SUSPENSE */) {
                  const suspense = vnode.suspense;
                  vnode = suspense.activeBranch;
                  if (suspense.pendingBranch && !suspense.isHydrating) {
      Severity: Minor
      Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

      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 getParentCondition has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      function getParentCondition(node) {
          while (true) {
                  if (node.type === 19 /* JS_CONDITIONAL_EXPRESSION */) {
                          if (node.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) {
                                  node = node.alternate;
      Severity: Minor
      Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

      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 genVNodeCall has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      function genVNodeCall(node, context) {
          const { push, helper, pure } = context;
          const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking } = node;
          if (directives) {
                  push(helper(WITH_DIRECTIVES) + `(`);
      Severity: Minor
      Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

      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 remove has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {
      Severity: Minor
      Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                        if (!tokenIndex)
                            subPattern =
                                // avoid an optional / if there are more segments e.g. /:p?-static
                                // or /:p?-:p2
                                optional && segment.length < 2
        Severity: Major
        Found in cherrydoor/static/js/vue-router.js - About 45 mins to fix

          Function hydrateTeleport has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

          function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector } }, hydrateChildren) {
              const target = (vnode.target = resolveTarget(vnode.props, querySelector));
              if (target) {
                      // if multiple teleports rendered to the same target element, we need to
                      // pick up from where the last teleport finished instead of the first node
          Severity: Minor
          Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

          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 patchClass has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

          function patchClass(el, value, isSVG) {
              if (value == null) {
                      value = '';
              }
              if (isSVG) {
          Severity: Minor
          Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

          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 flushPostFlushCbs has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

          function flushPostFlushCbs(seen) {
              if (pendingPostFlushCbs.length) {
                      const deduped = [...new Set(pendingPostFlushCbs)];
                      pendingPostFlushCbs.length = 0;
                      // #1947 already has active queue, nested flushPostFlushCbs call
          Severity: Minor
          Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

          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

                                                      if (p.type === 7 /* DIRECTIVE */ && p.name === 'bind' && p.exp) {
                                                              const expType = getConstantType(p.exp, context);
                                                              if (expType === 0 /* NOT_CONSTANT */) {
                                                                      constantCache.set(node, 0 /* NOT_CONSTANT */);
                                                                      return 0 /* NOT_CONSTANT */;
          Severity: Major
          Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                                if (isSymbol(needRuntime)) {
                                                        directiveImportMap.set(prop, needRuntime);
                                                }
            Severity: Major
            Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                                  for (let i = 0, l = allAttrs.length; i < l; i++) {
                                                          const key = allAttrs[i];
                                                          if (isOn(key)) {
                                                                  // ignore v-model handlers when they fail to fallthrough
                                                                  if (!isModelListener(key)) {
              Severity: Major
              Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                    if (eventAttrs.length) {
                                                            warn(`Extraneous non-emits event listeners (` +
                                                                    `${eventAttrs.join(', ')}) ` +
                                                                    `were passed to component but could not be automatically inherited ` +
                                                                    `because component renders fragment or text root nodes. ` +
                Severity: Major
                Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                              if (seenSlotNames.has(staticSlotName)) {
                                                      context.onError(createCompilerError(37 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */, dirLoc));
                                                      continue;
                                              }
                  Severity: Major
                  Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                        switch (type.value.content) {
                                                                case 'radio':
                                                                        directiveToUse = V_MODEL_RADIO;
                                                                        break;
                                                                case 'checkbox':
                    Severity: Major
                    Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                          if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
                                                                  return;
                                                          }
                      Severity: Major
                      Found in cherrydoor/static/js/vue-dev.js - About 45 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language