oplik0/cherrydoor

View on GitHub

Showing 650 of 650 total issues

Function processIf has 62 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function processIf(node, dir, context, processCodegen) {
    if (dir.name !== 'else' &&
            (!dir.exp || !dir.exp.content.trim())) {
            const loc = dir.exp ? dir.exp.loc : node.loc;
            context.onError(createCompilerError(27 /* X_V_IF_NO_EXPRESSION */, dir.loc));
Severity: Major
Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

    Function patchElement has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
                const el = (n2.el = n1.el);
                let { patchFlag, dynamicChildren, dirs } = n2;
                // #1426 take the old vnode's patch flag into account since user may clone a
                // compiler-generated vnode, which de-opts to FULL_PROPS
    Severity: Major
    Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

      Function a434 has 62 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 2 hrs to fix

        Function 9263 has 62 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        /***/ (function(module, exports, __webpack_require__) {
        
        "use strict";
        
        var regexpFlags = __webpack_require__("ad6d");
        Severity: Major
        Found in cherrydoor/static/components/VueTimepicker.js - About 2 hrs to fix

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

                                      if (node.children.length && hasMultipleChildren(node)) {
                                              context.onError(createDOMCompilerError(58 /* X_TRANSITION_INVALID_CHILDREN */, {
                                                      start: node.children[0].loc.start,
                                                      end: node.children[node.children.length - 1].loc.end,
                                                      source: ''
          Severity: Major
          Found in cherrydoor/static/js/vue-dev.js and 1 other location - About 2 hrs to fix
          cherrydoor/static/js/vue-dev.js on lines 13289..13295

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

          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

                                      if (node.children.length > 1) {
                                              context.onError(createCompilerError(44 /* X_KEEP_ALIVE_INVALID_CHILDREN */, {
                                                      start: node.children[0].loc.start,
                                                      end: node.children[node.children.length - 1].loc.end,
                                                      source: ''
          Severity: Major
          Found in cherrydoor/static/js/vue-dev.js and 1 other location - About 2 hrs to fix
          cherrydoor/static/js/vue-dev.js on lines 14471..14477

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

          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 transformModel$1 has 61 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const transformModel$1 = (dir, node, context) => {
              const baseResult = transformModel(dir, node, context);
              // base transform has errors OR component v-model (only need props)
              if (!baseResult.props.length || node.tagType === 1 /* COMPONENT */) {
                      return baseResult;
          Severity: Major
          Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

            Function handleError has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
            Open

            function handleError(err, instance, type, throwInDev = true) {
                const contextVNode = instance ? instance.vnode : null;
                if (instance) {
                        let cur = instance.parent;
                        // the exposed instance is the render proxy to keep it consistent with 2.x
            Severity: Minor
            Found in cherrydoor/static/js/vue-dev.js - About 2 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 createWatcher has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
            Open

            function createWatcher(raw, ctx, publicThis, key) {
                const getter = key.includes('.')
                        ? createPathGetter(publicThis, key)
                        : () => publicThis[key];
                if (isString(raw)) {
            Severity: Minor
            Found in cherrydoor/static/js/vue-dev.js - About 2 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 __init__.py has 267 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            from aiohttp.web import HTTPFound, get
            
            openapi_description = """
            # Overview
            
            
            Severity: Minor
            Found in cherrydoor/api/__init__.py - About 2 hrs to fix

              Function guardToPromiseFn has 60 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function guardToPromiseFn(guard, to, from, record, name) {
                  // keep a reference to the enterCallbackArray to prevent pushing callbacks if a new navigation took place
                  const enterCallbackArray =
                      record &&
                      // name is defined if record is because of the function overload
              Severity: Major
              Found in cherrydoor/static/js/vue-router.js - About 2 hrs to fix

                Function getConstantType has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function getConstantType(node, context) {
                    const { constantCache } = context;
                    switch (node.type) {
                            case 1 /* ELEMENT */:
                                    if (node.tagType !== 0 /* ELEMENT */) {
                Severity: Major
                Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

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

                      function split(separator, limit) {
                        var O = requireObjectCoercible(this);
                        var splitter = separator == undefined ? undefined : separator[SPLIT];
                        return splitter !== undefined
                          ? splitter.call(separator, O, limit)
                  Severity: Major
                  Found in cherrydoor/static/components/VueTimepicker.js and 1 other location - About 2 hrs to fix
                  cherrydoor/static/components/VueTimepicker.js on lines 1343..1349

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

                  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

                      function replace(searchValue, replaceValue) {
                        var O = requireObjectCoercible(this);
                        var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
                        return replacer !== undefined
                          ? replacer.call(searchValue, O, replaceValue)
                  Severity: Major
                  Found in cherrydoor/static/components/VueTimepicker.js and 1 other location - About 2 hrs to fix
                  cherrydoor/static/components/VueTimepicker.js on lines 297..303

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

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

                      setup(props, { slots }) {
                              const instance = getCurrentInstance();
                              const state = useTransitionState();
                              let prevChildren;
                              let children;
                  Severity: Major
                  Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

                    Function formatRouteRecordForInspector has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function formatRouteRecordForInspector(route) {
                        const tags = [];
                        const { record } = route;
                        if (record.name != null) {
                            tags.push({
                    Severity: Major
                    Found in cherrydoor/static/js/vue-router.js - About 2 hrs to fix

                      Function renderList has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function renderList(source, renderItem) {
                          let ret;
                          if (isArray(source) || isString(source)) {
                                  ret = new Array(source.length);
                                  for (let i = 0, l = source.length; i < l; i++) {
                      Severity: Minor
                      Found in cherrydoor/static/js/vue-dev.js - About 2 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 setSelected has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function setSelected(el, value) {
                          const isMultiple = el.multiple;
                          if (isMultiple && !isArray(value) && !isSet(value)) {
                                  warn(`<select multiple v-model> expects an Array or Set value for its binding, ` +
                                                  `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`);
                      Severity: Minor
                      Found in cherrydoor/static/js/vue-dev.js - About 2 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 transformModel has a Cognitive Complexity of 17 (exceeds 5 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 2 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 hasForwardedSlots has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function hasForwardedSlots(children) {
                          for (let i = 0; i < children.length; i++) {
                                  const child = children[i];
                                  switch (child.type) {
                                          case 1 /* ELEMENT */:
                      Severity: Minor
                      Found in cherrydoor/static/js/vue-dev.js - About 2 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