oplik0/cherrydoor

View on GitHub

Showing 650 of 650 total issues

File serial.py has 468 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""Serial communication and card authentication."""

__author__ = "opliko"
__license__ = "MIT"
__version__ = "0.8.b0"
Severity: Minor
Found in cherrydoor/interface/serial.py - About 7 hrs to fix

    Function addDevtools has 179 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function addDevtools(app, router, matcher) {
        return;
        // Take over router.beforeEach and afterEach
        // make sure we are not registering the devtool twice
        if (router.__hasDevtools) return;
    Severity: Major
    Found in cherrydoor/static/js/vue-router.js - About 7 hrs to fix

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

      /***/ "4de4":
      /***/ (function(module, exports, __webpack_require__) {
      
      "use strict";
      
      
      Severity: Major
      Found in cherrydoor/static/components/VueTimepicker.js and 1 other location - About 7 hrs to fix
      cherrydoor/static/components/VueTimepicker.js on lines 4089..4113

      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 177.

      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 2 locations. Consider refactoring.
      Open

      /***/ "d81d":
      /***/ (function(module, exports, __webpack_require__) {
      
      "use strict";
      
      
      Severity: Major
      Found in cherrydoor/static/components/VueTimepicker.js and 1 other location - About 7 hrs to fix
      cherrydoor/static/components/VueTimepicker.js on lines 1207..1231

      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 177.

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

      function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ, instance = currentInstance) {
          if (!cb) {
                  if (immediate !== undefined) {
                          warn(`watch() "immediate" option is only respected when using the ` +
                                  `watch(source, callback, options?) signature.`);
      Severity: Minor
      Found in cherrydoor/static/js/vue-dev.js - About 7 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 createRouterMatcher has 174 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function createRouterMatcher(routes, globalOptions) {
          // normalized ordered array of matchers
          const matchers = [];
          const matcherMap = new Map();
          globalOptions = mergeOptions(
      Severity: Major
      Found in cherrydoor/static/js/vue-router.js - About 6 hrs to fix

        Function normalizePropsOptions has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
        Open

        function normalizePropsOptions(comp, appContext, asMixin = false) {
            const cache = appContext.propsCache;
            const cached = cache.get(comp);
            if (cached) {
                    return cached;
        Severity: Minor
        Found in cherrydoor/static/js/vue-dev.js - About 6 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 createAppAPI has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
        Open

        function createAppAPI(render, hydrate) {
            return function createApp(rootComponent, rootProps = null) {
                    if (rootProps != null && !isObject(rootProps)) {
                            warn(`root props passed to app.mount() must be an object.`);
                            rootProps = null;
        Severity: Minor
        Found in cherrydoor/static/js/vue-dev.js - About 6 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 createSuspenseBoundary has 165 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
            /* istanbul ignore if */
            if (!hasWarned) {
                    hasWarned = true;
                    // @ts-ignore `console.info` cannot be null error
        Severity: Major
        Found in cherrydoor/static/js/vue-dev.js - About 6 hrs to fix

          Function applyOptions has 161 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function applyOptions(instance) {
              const options = resolveMergedOptions(instance);
              const publicThis = instance.proxy;
              const ctx = instance.ctx;
              // do not cache property access on public proxy during state initialization
          Severity: Major
          Found in cherrydoor/static/js/vue-dev.js - About 6 hrs to fix

            Function patchSuspense has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
            Open

            function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
                const suspense = (n2.suspense = n1.suspense);
                suspense.vnode = n2;
                n2.el = n1.el;
                const newBranch = n2.ssContent;
            Severity: Minor
            Found in cherrydoor/static/js/vue-dev.js - About 6 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 buildProps has 153 lines of code (exceeds 25 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: Major
            Found in cherrydoor/static/js/vue-dev.js - About 6 hrs to fix

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

                  setup(props, { slots }) {
                          const instance = getCurrentInstance();
                          // KeepAlive communicates with the instantiated renderer via the
                          // ctx where the renderer passes in its internals,
                          // and the KeepAlive instance exposes activate/deactivate implementations.
              Severity: Major
              Found in cherrydoor/static/js/vue-dev.js - About 6 hrs to fix

                Function _createVNode has a Cognitive Complexity of 39 (exceeds 5 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: Minor
                Found in cherrydoor/static/js/vue-dev.js - About 5 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 trigger has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
                Open

                function trigger(target, type, key, newValue, oldValue, oldTarget) {
                    const depsMap = targetMap.get(target);
                    if (!depsMap) {
                            // never been tracked
                            return;
                Severity: Minor
                Found in cherrydoor/static/js/vue-dev.js - About 5 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 process has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                Open

                    process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
                            const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals;
                            const disabled = isTeleportDisabled(n2.props);
                            let { shapeFlag, children, dynamicChildren } = n2;
                            // #3302
                Severity: Minor
                Found in cherrydoor/static/js/vue-dev.js - About 5 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 createGetter has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
                Open

                function createGetter(isReadonly = false, shallow = false) {
                    return function get(target, key, receiver) {
                            if (key === "__v_isReactive" /* IS_REACTIVE */) {
                                    return !isReadonly;
                            }
                Severity: Minor
                Found in cherrydoor/static/js/vue-dev.js - About 5 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 socketio.py has 390 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """Websocket handlers."""
                
                __author__ = "opliko"
                __license__ = "MIT"
                __version__ = "0.8.b0"
                Severity: Minor
                Found in cherrydoor/socketio.py - About 5 hrs to fix

                  Function createAppAPI has 132 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function createAppAPI(render, hydrate) {
                      return function createApp(rootComponent, rootProps = null) {
                              if (rootProps != null && !isObject(rootProps)) {
                                      warn(`root props passed to app.mount() must be an object.`);
                                      rootProps = null;
                  Severity: Major
                  Found in cherrydoor/static/js/vue-dev.js - About 5 hrs to fix

                    Function createApp has 130 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        return function createApp(rootComponent, rootProps = null) {
                                if (rootProps != null && !isObject(rootProps)) {
                                        warn(`root props passed to app.mount() must be an object.`);
                                        rootProps = null;
                                }
                    Severity: Major
                    Found in cherrydoor/static/js/vue-dev.js - About 5 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language