oplik0/cherrydoor

View on GitHub

Showing 556 of 650 total issues

Function handleError has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

function handleError(err, instance, type, throwInDev = true) {
    const contextVNode = instance ? instance.vnode : null;
    if (instance) {
            let cur = instance.parent;
            // the exposed instance is the render proxy to keep it consistent with 2.x
Severity: Minor
Found in cherrydoor/static/js/vue-dev.js - About 2 hrs 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 createWatcher has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

function createWatcher(raw, ctx, publicThis, key) {
    const getter = key.includes('.')
            ? createPathGetter(publicThis, key)
            : () => publicThis[key];
    if (isString(raw)) {
Severity: Minor
Found in cherrydoor/static/js/vue-dev.js - About 2 hrs 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

File __init__.py has 267 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from aiohttp.web import HTTPFound, get

openapi_description = """
# Overview

Severity: Minor
Found in cherrydoor/api/__init__.py - About 2 hrs to fix

    Function guardToPromiseFn has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function guardToPromiseFn(guard, to, from, record, name) {
        // keep a reference to the enterCallbackArray to prevent pushing callbacks if a new navigation took place
        const enterCallbackArray =
            record &&
            // name is defined if record is because of the function overload
    Severity: Major
    Found in cherrydoor/static/js/vue-router.js - About 2 hrs to fix

      Function getConstantType has 60 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function getConstantType(node, context) {
          const { constantCache } = context;
          switch (node.type) {
                  case 1 /* ELEMENT */:
                          if (node.tagType !== 0 /* ELEMENT */) {
      Severity: Major
      Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

        Function setup has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            setup(props, { slots }) {
                    const instance = getCurrentInstance();
                    const state = useTransitionState();
                    let prevChildren;
                    let children;
        Severity: Major
        Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

          Function formatRouteRecordForInspector has 57 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function formatRouteRecordForInspector(route) {
              const tags = [];
              const { record } = route;
              if (record.name != null) {
                  tags.push({
          Severity: Major
          Found in cherrydoor/static/js/vue-router.js - About 2 hrs to fix

            Function renderList has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
            Open

            function renderList(source, renderItem) {
                let ret;
                if (isArray(source) || isString(source)) {
                        ret = new Array(source.length);
                        for (let i = 0, l = source.length; i < l; i++) {
            Severity: Minor
            Found in cherrydoor/static/js/vue-dev.js - About 2 hrs 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 setSelected has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
            Open

            function setSelected(el, value) {
                const isMultiple = el.multiple;
                if (isMultiple && !isArray(value) && !isSet(value)) {
                        warn(`<select multiple v-model> expects an Array or Set value for its binding, ` +
                                        `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`);
            Severity: Minor
            Found in cherrydoor/static/js/vue-dev.js - About 2 hrs 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 transformModel has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
            Open

            const transformModel = (dir, node, context) => {
                const { exp, arg } = dir;
                if (!exp) {
                        context.onError(createCompilerError(40 /* X_V_MODEL_NO_EXPRESSION */, dir.loc));
                        return createTransformProps();
            Severity: Minor
            Found in cherrydoor/static/js/vue-dev.js - About 2 hrs 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 hasForwardedSlots has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
            Open

            function hasForwardedSlots(children) {
                for (let i = 0; i < children.length; i++) {
                        const child = children[i];
                        switch (child.type) {
                                case 1 /* ELEMENT */:
            Severity: Minor
            Found in cherrydoor/static/js/vue-dev.js - About 2 hrs 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 formatProp has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
            Open

            function formatProp(key, value, raw) {
                if (isString(value)) {
                        value = JSON.stringify(value);
                        return raw ? value : [`${key}=${value}`];
                }
            Severity: Minor
            Found in cherrydoor/static/js/vue-dev.js - About 2 hrs 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 setupStatefulComponent has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function setupStatefulComponent(instance, isSSR) {
                const Component = instance.type;
                {
                        if (Component.name) {
                                validateComponentName(Component.name, instance.appContext.config);
            Severity: Major
            Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

              Function 8875 has 56 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              /***/ (function(module, exports, __webpack_require__) {
              
              var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
              // MIT license
              // source: https://github.com/amiller-gh/currentScript-polyfill
              Severity: Major
              Found in cherrydoor/static/components/VueTimepicker.js - About 2 hrs to fix

                Function 69f3 has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                /***/ (function(module, exports, __webpack_require__) {
                
                var NATIVE_WEAK_MAP = __webpack_require__("7f9a");
                var global = __webpack_require__("da84");
                var isObject = __webpack_require__("861d");
                Severity: Major
                Found in cherrydoor/static/components/VueTimepicker.js - About 2 hrs to fix

                  Function resolve has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function resolve(location, currentLocation) {
                          let matcher;
                          let params = {};
                          let path;
                          let name;
                  Severity: Major
                  Found in cherrydoor/static/js/vue-router.js - About 2 hrs to fix

                    Function formatRouteRecordMatcherForStateInspector has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function formatRouteRecordMatcherForStateInspector(route) {
                        const { record } = route;
                        const fields = [{ editable: false, key: "path", value: record.path }];
                        if (record.name != null) {
                            fields.push({
                    Severity: Major
                    Found in cherrydoor/static/js/vue-router.js - About 2 hrs to fix

                      Function hydrateElement has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
                                  optimized = optimized || !!vnode.dynamicChildren;
                                  const { props, patchFlag, shapeFlag, dirs } = vnode;
                                  // skip props & children if this is hoisted static nodes
                                  if (patchFlag !== -1 /* HOISTED */) {
                      Severity: Major
                      Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

                        Function walk has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function walk(node, context, doNotHoistNode = false) {
                            let hasHoistedNode = false;
                            // Some transforms, e.g. transformAssetUrls from @vue/compiler-sfc, replaces
                            // static bindings with expressions. These expressions are guaranteed to be
                            // constant so they are still eligible for hoisting, but they are only
                        Severity: Major
                        Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

                          Function transformOn has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const transformOn = (dir, node, context, augmentor) => {
                              const { loc, modifiers, arg } = dir;
                              if (!dir.exp && !modifiers.length) {
                                      context.onError(createCompilerError(34 /* X_V_ON_NO_EXPRESSION */, loc));
                              }
                          Severity: Major
                          Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language