oplik0/cherrydoor

View on GitHub

Showing 556 of 650 total issues

Function walk has a Cognitive Complexity of 64 (exceeds 5 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: Minor
Found in cherrydoor/static/js/vue-dev.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

Function a4d3 has 250 lines of code (exceeds 25 allowed). Consider refactoring.
Open

/***/ (function(module, exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__("23e7");
Severity: Major
Found in cherrydoor/static/components/VueTimepicker.js - About 1 day to fix

    Function applyOptions has a Cognitive Complexity of 63 (exceeds 5 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: Minor
    Found in cherrydoor/static/js/vue-dev.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 mongo.py has 558 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    """Functions to simplify interacting with database."""
    import datetime as dt
    from math import ceil
    
    from bson.objectid import ObjectId
    Severity: Major
    Found in cherrydoor/database/mongo.py - About 1 day to fix

      Function install has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
      Open

      def install(args):
          if sys.platform == "linux" or 1 == 1:
      
              if step_enabled("dependencies", args):
                  # install MongoDB and some other things if they're not installed
      Severity: Minor
      Found in cherrydoor/cli/install.py - 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

      Function resolveTransitionHooks has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
      Open

      function resolveTransitionHooks(vnode, props, state, instance) {
          const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props;
          const key = String(vnode.key);
          const leavingVNodesCache = getLeavingNodesForType(state, vnode);
          const callHook = (hook, args) => {
      Severity: Minor
      Found in cherrydoor/static/js/vue-dev.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

      Function transformElement has a Cognitive Complexity of 55 (exceeds 5 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: Minor
      Found in cherrydoor/static/js/vue-dev.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

      Function initCustomFormatter has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
      Open

      function initCustomFormatter() {
          /* eslint-disable no-restricted-globals */
          if (typeof window === 'undefined') {
                  return;
          }
      Severity: Minor
      Found in cherrydoor/static/js/vue-dev.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

      Function transformText has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
      Open

      const transformText = (node, context) => {
          if (node.type === 0 /* ROOT */ ||
                  node.type === 1 /* ELEMENT */ ||
                  node.type === 11 /* FOR */ ||
                  node.type === 10 /* IF_BRANCH */) {
      Severity: Minor
      Found in cherrydoor/static/js/vue-dev.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

      Function tokenizePath has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
      Open

      function tokenizePath(path) {
          if (!path) return [[]];
          if (path === "/") return [[ROOT_TOKEN]];
          if (!path.startsWith("/")) {
              throw new Error(
      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

      Function createSuspenseBoundary has a Cognitive Complexity of 51 (exceeds 5 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: 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 initCustomFormatter has 182 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function initCustomFormatter() {
          /* eslint-disable no-restricted-globals */
          if (typeof window === 'undefined') {
                  return;
          }
      Severity: Major
      Found in cherrydoor/static/js/vue-dev.js - About 7 hrs to fix

        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

            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
                  Severity
                  Category
                  Status
                  Source
                  Language