oplik0/cherrydoor

View on GitHub

Showing 556 of 650 total issues

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

    function resolve(rawLocation, currentLocation) {
        // const objectLocation = routerLocationAsObject(rawLocation)
        // we create a copy to modify it later
        currentLocation = assign({}, currentLocation || currentRoute.value);
        if (typeof rawLocation === "string") {
Severity: Major
Found in cherrydoor/static/js/vue-router.js - About 3 hrs to fix

    Function generate has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

    function generate(ast, options = {}) {
        const context = createCodegenContext(ast, options);
        if (options.onContextCreated)
                options.onContextCreated(context);
        const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context;
    Severity: Minor
    Found in cherrydoor/static/js/vue-dev.js - About 3 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 extractComponentsGuards has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

    function extractComponentsGuards(matched, guardType, to, from) {
        const guards = [];
        for (const record of matched) {
            for (const name in record.components) {
                let rawComponent = record.components[name];
    Severity: Minor
    Found in cherrydoor/static/js/vue-router.js - About 3 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 cards_endpoint.py has 313 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import datetime as dt
    import json
    from typing import List
    
    from aiojobs.aiohttp import atomic
    Severity: Minor
    Found in cherrydoor/api/cards_endpoint.py - About 3 hrs to fix

      Function d784 has 87 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      /***/ (function(module, exports, __webpack_require__) {
      
      "use strict";
      
      // TODO: Remove from `core-js@4` since it's moved to entry points
      Severity: Major
      Found in cherrydoor/static/components/VueTimepicker.js - About 3 hrs to fix

        Function useHistoryStateNavigation has 86 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function useHistoryStateNavigation(base) {
            const { history, location } = window;
            // private variables
            let currentLocation = {
                value: createCurrentLocation(base, location),
        Severity: Major
        Found in cherrydoor/static/js/vue-router.js - About 3 hrs to fix

          Function transformElement has 86 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const transformElement = (node, context) => {
              // perform the work on exit, after all child expressions have been
              // processed and merged.
              return function postTransformElement() {
                      node = context.currentNode;
          Severity: Major
          Found in cherrydoor/static/js/vue-dev.js - About 3 hrs to fix

            Function setFullProps has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

            function setFullProps(instance, rawProps, props, attrs) {
                const [options, needCastKeys] = instance.propsOptions;
                let hasAttrsChanged = false;
                let rawCastValues;
                if (rawProps) {
            Severity: Minor
            Found in cherrydoor/static/js/vue-dev.js - About 3 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 has a Cognitive Complexity of 24 (exceeds 5 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: Minor
            Found in cherrydoor/static/js/vue-dev.js - About 3 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 resolveModifiers has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

            const resolveModifiers = (key, modifiers, context, loc) => {
                const keyModifiers = [];
                const nonKeyModifiers = [];
                const eventOptionModifiers = [];
                for (let i = 0; i < modifiers.length; i++) {
            Severity: Minor
            Found in cherrydoor/static/js/vue-dev.js - About 3 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 opts has 85 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                opts: function opts() {
                  var options = Object.assign({}, DEFAULT_OPTIONS);
            
                  if (this.format && this.format.length) {
                    options.format = String(this.format);
            Severity: Major
            Found in cherrydoor/static/components/VueTimepicker.js - About 3 hrs to fix

              Function navigate has 84 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function navigate(to, from) {
                      let guards;
                      const [leavingRecords, updatingRecords, enteringRecords] =
                          extractChangingRecords(to, from);
                      // all components here have been resolved once because we are leaving
              Severity: Major
              Found in cherrydoor/static/js/vue-router.js - About 3 hrs to fix

                Function postTransformElement has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    return function postTransformElement() {
                            node = context.currentNode;
                            if (!(node.type === 1 /* ELEMENT */ &&
                                    (node.tagType === 0 /* ELEMENT */ ||
                                            node.tagType === 1 /* COMPONENT */))) {
                Severity: Major
                Found in cherrydoor/static/js/vue-dev.js - About 3 hrs to fix

                  Function update has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def update(args, config={}):
                      if config == {}:
                          config = load_config(args)[0]
                      previous_version = parse_version(
                          import_module("cherrydoor.__version__").__version__
                  Severity: Minor
                  Found in cherrydoor/cli/update.py - About 3 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 _createVNode has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
                      if (!type || type === NULL_DYNAMIC_COMPONENT) {
                              if (!type) {
                                      warn(`Invalid vnode type when creating vnode: ${type}.`);
                              }
                  Severity: Major
                  Found in cherrydoor/static/js/vue-dev.js - About 3 hrs to fix

                    Function readStringValues has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        readStringValues: function readStringValues(stringValue) {
                          var _this7 = this;
                    
                          // Failsafe for empty `v-model` string
                          if (!stringValue || !stringValue.length) {
                    Severity: Major
                    Found in cherrydoor/static/components/VueTimepicker.js - About 3 hrs to fix

                      Function parseAttribute has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function parseAttribute(context, nameSet) {
                          // Name.
                          const start = getCursor(context);
                          const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source);
                          const name = match[0];
                      Severity: Major
                      Found in cherrydoor/static/js/vue-dev.js - About 3 hrs to fix

                        Function resolveTransitionProps has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function resolveTransitionProps(rawProps) {
                            const baseProps = {};
                            for (const key in rawProps) {
                                    if (!(key in DOMTransitionPropsValidators)) {
                                            baseProps[key] = rawProps[key];
                        Severity: Major
                        Found in cherrydoor/static/js/vue-dev.js - About 3 hrs to fix

                          Function patchDOMProp has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function patchDOMProp(el, key, value, 
                          // the following args are passed only due to potential innerHTML/textContent
                          // overriding existing VNodes, in which case the old tree must be properly
                          // unmounted.
                          prevChildren, parentComponent, parentSuspense, unmountChildren) {
                          Severity: Minor
                          Found in cherrydoor/static/js/vue-dev.js - About 3 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 getNamespace has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                          Open

                              getNamespace(tag, parent) {
                                      let ns = parent ? parent.ns : 0 /* HTML */;
                                      if (parent && ns === 2 /* MATH_ML */) {
                                              if (parent.tag === 'annotation-xml') {
                                                      if (tag === 'svg') {
                          Severity: Minor
                          Found in cherrydoor/static/js/vue-dev.js - About 3 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

                          Severity
                          Category
                          Status
                          Source
                          Language