oplik0/cherrydoor

View on GitHub

Showing 650 of 650 total issues

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

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

                  /***/ (function(module, exports, __webpack_require__) {
                  
                  var anObject = __webpack_require__("825a");
                  var defineProperties = __webpack_require__("37e8");
                  var enumBugKeys = __webpack_require__("7839");
                  Severity: Major
                  Found in cherrydoor/static/components/VueTimepicker.js - About 2 hrs to fix

                    Function exports has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
                      createIteratorConstructor(IteratorConstructor, NAME, next);
                    
                      var getIterationMethod = function (KIND) {
                        if (KIND === DEFAULT && defaultIterator) return defaultIterator;
                    Severity: Major
                    Found in cherrydoor/static/components/VueTimepicker.js - About 2 hrs to fix

                      Function mountElement has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
                                  let el;
                                  let vnodeHook;
                                  const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode;
                                  {
                      Severity: Major
                      Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

                        Function genNode has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function genNode(node, context) {
                            if (isString(node)) {
                                    context.push(node);
                                    return;
                            }
                        Severity: Major
                        Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

                          Function resolveComponentType has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function resolveComponentType(node, context, ssr = false) {
                              let { tag } = node;
                              // 1. dynamic component
                              const isExplicitDynamic = isComponentTag(tag);
                              const isProp = findProp(node, 'is') || (!isExplicitDynamic && findDir(node, 'is'));
                          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 transformOn$1 has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                          Open

                          const transformOn$1 = (dir, node, context) => {
                              return transformOn(dir, node, context, baseResult => {
                                      const { modifiers } = dir;
                                      if (!modifiers.length)
                                              return baseResult;
                          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 useHistoryListeners has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function useHistoryListeners(base, historyState, currentLocation, replace) {
                              let listeners = [];
                              let teardowns = [];
                              // TODO: should it be a stack? a Dict. Check if the popstate listener
                              // can trigger twice
                          Severity: Minor
                          Found in cherrydoor/static/js/vue-router.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 formatComponentName has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function formatComponentName(instance, Component, isRoot = false) {
                              let name = getComponentName(Component);
                              if (!name && Component.__file) {
                                      const match = Component.__file.match(/([^/\\]+)\.\w+$/);
                                      if (match) {
                          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 parseQuery has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function parseQuery(search) {
                              const query = {};
                              // avoid creating an object with an empty key and empty value
                              // because of split('&')
                              if (search === "" || search === "?") return query;
                          Severity: Minor
                          Found in cherrydoor/static/js/vue-router.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 exports has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          module.exports = function (KEY, length, exec, sham) {
                            var SYMBOL = wellKnownSymbol(KEY);
                          
                            var DELEGATES_TO_SYMBOL = !fails(function () {
                              // String methods call symbol-named RegEp methods
                          Severity: Major
                          Found in cherrydoor/static/components/VueTimepicker.js - About 2 hrs to fix

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

                                        resolve(resume = false) {
                                                {
                                                        if (!resume && !suspense.pendingBranch) {
                                                                throw new Error(`suspense.resolve() is called without a pending branch.`);
                                                        }
                            Severity: Major
                            Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language