oplik0/cherrydoor

View on GitHub

Showing 650 of 650 total issues

Function shouldSetAsProp has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function shouldSetAsProp(el, key, value, isSVG) {
    if (isSVG) {
            // most keys must be set as attribute on svg elements to work
            // ...except innerHTML
            if (key === 'innerHTML') {
Severity: Minor
Found in cherrydoor/static/js/vue-dev.js - About 1 hr 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 patchAttr has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function patchAttr(el, key, value, isSVG, instance) {
    if (isSVG && key.startsWith('xlink:')) {
            if (value == null) {
                    el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
            }
Severity: Minor
Found in cherrydoor/static/js/vue-dev.js - About 1 hr 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 cmd_enter has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

        cmd_enter() {
            if (this.value) {
                this.history_[this.history_.length] = this.value;
                this.histpos_ = this.history_.length;
            }
Severity: Minor
Found in cherrydoor/static/components/v-shell.js - About 1 hr 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 getSequence has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function getSequence(arr) {
    const p = arr.slice();
    const result = [0];
    let i, j, u, v, c;
    const len = arr.length;
Severity: Minor
Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

    Function normalizeChildren has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function normalizeChildren(vnode, children) {
        let type = 0;
        const { shapeFlag } = vnode;
        if (children == null) {
                children = null;
    Severity: Minor
    Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

      Function setKbInput has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          setKbInput: function setKbInput(value) {
            value = value || this.kbInputLog;
            var currentChunk = this.getCurrentTokenChunk();
      
            if (!currentChunk || !value || !value.length) {
      Severity: Minor
      Found in cherrydoor/static/components/VueTimepicker.js - About 1 hr to fix

        Function tokenChunksPos has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            tokenChunksPos: function tokenChunksPos() {
              var _this4 = this;
        
              if (!this.manualInput) {
                return false;
        Severity: Minor
        Found in cherrydoor/static/components/VueTimepicker.js - About 1 hr to fix

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

                              return (`Async component${name ? ` <${name}>` : `s`} should be explicitly created via \`defineAsyncComponent()\` ` +
                                      `in Vue 3. Plain functions will be treated as functional components in ` +
                                      `non-compat build. If you have already migrated all async component ` +
                                      `usage and intend to use plain functions for functional components, ` +
                                      `you can disable the compat behavior and suppress this ` +
          Severity: Major
          Found in cherrydoor/static/js/vue-dev.js and 2 other locations - About 1 hr to fix
          cherrydoor/static/js/vue-dev.js on lines 1657..1661
          cherrydoor/static/js/vue-dev.js on lines 2066..2070

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

          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 (`Functional component${name ? ` <${name}>` : `s`} should be defined as a plain function in Vue 3. The "functional" ` +
                                      `option has been removed. NOTE: Before migrating to use plain ` +
                                      `functions for functional components, first make sure that all async ` +
                                      `components usage have been migrated and its compat behavior has ` +
                                      `been disabled.`);
          Severity: Major
          Found in cherrydoor/static/js/vue-dev.js and 2 other locations - About 1 hr to fix
          cherrydoor/static/js/vue-dev.js on lines 1657..1661
          cherrydoor/static/js/vue-dev.js on lines 2053..2057

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

          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

                              warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +
                                      `This means you have a reactive effect that is mutating its own ` +
                                      `dependencies and thus recursively triggering itself. Possible sources ` +
                                      `include component template, render function, updated hook or ` +
                                      `watcher source function.`);
          Severity: Major
          Found in cherrydoor/static/js/vue-dev.js and 2 other locations - About 1 hr to fix
          cherrydoor/static/js/vue-dev.js on lines 2053..2057
          cherrydoor/static/js/vue-dev.js on lines 2066..2070

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

          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 normalizeEmitsOptions has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function normalizeEmitsOptions(comp, appContext, asMixin = false) {
              const cache = appContext.emitsCache;
              const cached = cache.get(comp);
              if (cached !== undefined) {
                      return cached;
          Severity: Minor
          Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

            Function registerDep has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        registerDep(instance, setupRenderEffect) {
                                const isInPendingSuspense = !!suspense.pendingBranch;
                                if (isInPendingSuspense) {
                                        suspense.deps++;
                                }
            Severity: Minor
            Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

              Function enter has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          enter(el) {
                                  let hook = onEnter;
                                  let afterHook = onAfterEnter;
                                  let cancelHook = onEnterCancelled;
                                  if (!state.isMounted) {
              Severity: Minor
              Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

                Function genFunctionExpression has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function genFunctionExpression(node, context) {
                    const { push, indent, deindent, scopeId, mode } = context;
                    const { params, returns, body, newline, isSlot } = node;
                    if (isSlot) {
                            // wrap slot functions with owner context
                Severity: Minor
                Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

                  Function processFragment has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
                              const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateText(''));
                              const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText(''));
                              let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
                              if (dynamicChildren) {
                  Severity: Minor
                  Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

                    Function processSlotOutlet has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function processSlotOutlet(node, context) {
                        let slotName = `"default"`;
                        let slotProps = undefined;
                        const nonNameProps = [];
                        for (let i = 0; i < node.props.length; i++) {
                    Severity: Minor
                    Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

                      Function transformModel has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const transformModel = (dir, node, context) => {
                          const { exp, arg } = dir;
                          if (!exp) {
                                  context.onError(createCompilerError(40 /* X_V_MODEL_NO_EXPRESSION */, dir.loc));
                                  return createTransformProps();
                      Severity: Minor
                      Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

                        Function resolveModifiers has 38 lines of code (exceeds 25 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 1 hr to fix

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

                                      if (this.history_.length) {
                                          if (this.history_[this.histpos_]) {
                                              this.history_[this.histpos_] = this.value;
                                          } else {
                                              this.histtemp_ = this.value;
                          Severity: Major
                          Found in cherrydoor/static/components/v-shell.js and 1 other location - About 1 hr to fix
                          cherrydoor/static/components/v-shell.js on lines 100..106

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

                          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

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

                                      if (this.history_.length) {
                                          if (this.history_[this.histpos_]) {
                                              this.history_[this.histpos_] = this.value;
                                          } else {
                                              this.histtemp_ = this.value;
                          Severity: Major
                          Found in cherrydoor/static/components/v-shell.js and 1 other location - About 1 hr to fix
                          cherrydoor/static/components/v-shell.js on lines 117..123

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

                          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

                          Severity
                          Category
                          Status
                          Source
                          Language