oplik0/cherrydoor

View on GitHub

Showing 650 of 650 total issues

File vue-dev.js has 11906 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Make a map and return a function for checking if a key
 * is in that map.
 * IMPORTANT: all calls of this function must be prefixed with
 * \/\*#\_\_PURE\_\_\*\/
Severity: Major
Found in cherrydoor/static/js/vue-dev.js - About 1 mo to fix

    File VueTimepicker.js has 5224 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (function webpackUniversalModuleDefinition(root, factory) {
        if(typeof exports === 'object' && typeof module === 'object')
            module.exports = factory(require("vue"));
        else if(typeof define === 'function' && define.amd)
            define([], factory);
    Severity: Major
    Found in cherrydoor/static/components/VueTimepicker.js - About 2 wks to fix

      Function fb15 has 2515 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      /***/ (function(module, __webpack_exports__, __webpack_require__) {
      
      "use strict";
      // ESM COMPAT FLAG
      __webpack_require__.r(__webpack_exports__);
      Severity: Major
      Found in cherrydoor/static/components/VueTimepicker.js - About 1 wk to fix

        Function baseCreateRenderer has a Cognitive Complexity of 560 (exceeds 5 allowed). Consider refactoring.
        Open

        function baseCreateRenderer(options, createHydrationFns) {
            {
                    const target = getGlobalThis();
                    target.__VUE__ = true;
                    setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__);
        Severity: Minor
        Found in cherrydoor/static/js/vue-dev.js - About 1 wk 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 vue-router.js has 2720 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*!
         * vue-router v4.0.8
         * (c) 2021 Eduardo San Martin Morote
         * @license MIT
         */
        Severity: Major
        Found in cherrydoor/static/js/vue-router.js - About 1 wk to fix

          Similar blocks of code found in 3 locations. Consider refactoring.
          Open

              ))], 32)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), column === 'minute' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("ul", {
                key: column,
                class: "minutes",
                tabindex: "-1",
                onScroll: _cache[29] || (_cache[29] = function () {
          Severity: Major
          Found in cherrydoor/static/components/VueTimepicker.js and 2 other locations - About 5 days to fix
          cherrydoor/static/components/VueTimepicker.js on lines 4736..4786
          cherrydoor/static/components/VueTimepicker.js on lines 4836..4886

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 927.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 3 locations. Consider refactoring.
          Open

              return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, [column === 'hour' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("ul", {
                key: column,
                class: "hours",
                tabindex: "-1",
                onScroll: _cache[23] || (_cache[23] = function () {
          Severity: Major
          Found in cherrydoor/static/components/VueTimepicker.js and 2 other locations - About 5 days to fix
          cherrydoor/static/components/VueTimepicker.js on lines 4786..4836
          cherrydoor/static/components/VueTimepicker.js on lines 4836..4886

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 927.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 3 locations. Consider refactoring.
          Open

              ))], 32)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), column === 'second' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("ul", {
                key: column,
                class: "seconds",
                tabindex: "-1",
                onScroll: _cache[35] || (_cache[35] = function () {
          Severity: Major
          Found in cherrydoor/static/components/VueTimepicker.js and 2 other locations - About 5 days to fix
          cherrydoor/static/components/VueTimepicker.js on lines 4736..4786
          cherrydoor/static/components/VueTimepicker.js on lines 4786..4836

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 927.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Function baseCreateRenderer has 946 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function baseCreateRenderer(options, createHydrationFns) {
              {
                      const target = getGlobalThis();
                      target.__VUE__ = true;
                      setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__);
          Severity: Major
          Found in cherrydoor/static/js/vue-dev.js - About 4 days to fix

            Function createHydrationFunctions has a Cognitive Complexity of 197 (exceeds 5 allowed). Consider refactoring.
            Open

            function createHydrationFunctions(rendererInternals) {
                const { mt: mountComponent, p: patch, o: { patchProp, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
                const hydrate = (vnode, container) => {
                        if (!container.hasChildNodes()) {
                                warn(`Attempting to hydrate existing markup but container is empty. ` +
            Severity: Minor
            Found in cherrydoor/static/js/vue-dev.js - About 4 days 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 createRouter has 540 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function createRouter(options) {
                const matcher = createRouterMatcher(options.routes, options);
                let parseQuery$1 = options.parseQuery || parseQuery;
                let stringifyQuery$1 = options.stringifyQuery || stringifyQuery;
                let routerHistory = options.history;
            Severity: Major
            Found in cherrydoor/static/js/vue-router.js - About 2 days to fix

              Function tokensToParser has a Cognitive Complexity of 132 (exceeds 5 allowed). Consider refactoring.
              Open

              function tokensToParser(segments, extraOptions) {
                  const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);
                  // the amount of scores is the same as the length of segments except for the root segment "/"
                  let score = [];
                  // the regexp as a string
              Severity: Minor
              Found in cherrydoor/static/js/vue-router.js - About 2 days 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 buildProps has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring.
              Open

              function buildProps(node, context, props = node.props, ssr = false) {
                  const { tag, loc: elementLoc } = node;
                  const isComponent = node.tagType === 1 /* COMPONENT */;
                  let properties = [];
                  const mergeArgs = [];
              Severity: Minor
              Found in cherrydoor/static/js/vue-dev.js - About 2 days 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

              Similar blocks of code found in 3 locations. Consider refactoring.
              Open

                  return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, [column === 'hour' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("ul", {
                    key: column,
                    class: "hours",
                    onScroll: _cache[14] || (_cache[14] = function () {
                      return $options.keepFocusing.apply($options, arguments);
              Severity: Major
              Found in cherrydoor/static/components/VueTimepicker.js and 2 other locations - About 2 days to fix
              cherrydoor/static/components/VueTimepicker.js on lines 4650..4676
              cherrydoor/static/components/VueTimepicker.js on lines 4676..4702

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 407.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 3 locations. Consider refactoring.
              Open

                  ))], 32)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), column === 'second' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("ul", {
                    key: column,
                    class: "seconds",
                    onScroll: _cache[16] || (_cache[16] = function () {
                      return $options.keepFocusing.apply($options, arguments);
              Severity: Major
              Found in cherrydoor/static/components/VueTimepicker.js and 2 other locations - About 2 days to fix
              cherrydoor/static/components/VueTimepicker.js on lines 4624..4650
              cherrydoor/static/components/VueTimepicker.js on lines 4650..4676

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 407.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 3 locations. Consider refactoring.
              Open

                  ))], 32)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), column === 'minute' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("ul", {
                    key: column,
                    class: "minutes",
                    onScroll: _cache[15] || (_cache[15] = function () {
                      return $options.keepFocusing.apply($options, arguments);
              Severity: Major
              Found in cherrydoor/static/components/VueTimepicker.js and 2 other locations - About 2 days to fix
              cherrydoor/static/components/VueTimepicker.js on lines 4624..4650
              cherrydoor/static/components/VueTimepicker.js on lines 4676..4702

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 407.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Function createRouter has a Cognitive Complexity of 103 (exceeds 5 allowed). Consider refactoring.
              Open

              function createRouter(options) {
                  const matcher = createRouterMatcher(options.routes, options);
                  let parseQuery$1 = options.parseQuery || parseQuery;
                  let stringifyQuery$1 = options.stringifyQuery || stringifyQuery;
                  let routerHistory = options.history;
              Severity: Minor
              Found in cherrydoor/static/js/vue-router.js - About 2 days 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 render has 394 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function render(_ctx, _cache, $props, $setup, $data, $options) {
                return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("span", {
                  class: "vue__time-picker time-picker",
                  style: $options.inputWidthStyle
                }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("input", {
              Severity: Major
              Found in cherrydoor/static/components/VueTimepicker.js - About 1 day to fix

                Function createRouterMatcher has a Cognitive Complexity of 94 (exceeds 5 allowed). Consider refactoring.
                Open

                function createRouterMatcher(routes, globalOptions) {
                    // normalized ordered array of matchers
                    const matchers = [];
                    const matcherMap = new Map();
                    globalOptions = mergeOptions(
                Severity: Minor
                Found in cherrydoor/static/js/vue-router.js - About 1 day 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 manage_user_endpoint.py has 717 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: Major
                Found in cherrydoor/api/manage_user_endpoint.py - About 1 day to fix
                  Severity
                  Category
                  Status
                  Source
                  Language