oplik0/cherrydoor

View on GitHub

Showing 650 of 650 total issues

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

      if (this.inUse.apm && !this.isEmptyValue(this.apmType, this.apm) && (!this.isValidValue(this.apmType, this.apm) || this.isDisabled('apm', this.apm))) {
        result.push('apm');
      }
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 5881..5883

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

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 process has 67 lines of code (exceeds 25 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: Major
Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

    Function 4d63 has 67 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    /***/ (function(module, exports, __webpack_require__) {
    
    var DESCRIPTORS = __webpack_require__("83ab");
    var global = __webpack_require__("da84");
    var isForced = __webpack_require__("94ca");
    Severity: Major
    Found in cherrydoor/static/components/VueTimepicker.js - About 2 hrs to fix

      Function updateProps has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function updateProps(instance, rawProps, rawPrevProps, optimized) {
          const { props, attrs, vnode: { patchFlag } } = instance;
          const rawCurrentProps = toRaw(props);
          const [options] = instance.propsOptions;
          let hasAttrsChanged = false;
      Severity: Major
      Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

        Function normalizePropsOptions has 66 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function normalizePropsOptions(comp, appContext, asMixin = false) {
            const cache = appContext.propsCache;
            const cached = cache.get(comp);
            if (cached) {
                    return cached;
        Severity: Major
        Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

          Function emit has 65 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function emit(instance, event, ...rawArgs) {
              const props = instance.vnode.props || EMPTY_OBJ;
              {
                      const { emitsOptions, propsOptions: [propsOptions] } = instance;
                      if (emitsOptions) {
          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

                secondRangeList: function secondRangeList() {
                  if (!this.secondType || !this.opts.secondRange) {
                    return false;
                  }
            
            
            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 5733..5743

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

            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

                minuteRangeList: function minuteRangeList() {
                  if (!this.minuteType || !this.opts.minuteRange) {
                    return false;
                  }
            
            
            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 5744..5754

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

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

            function traverseNode(node, context) {
                context.currentNode = node;
                // apply transform plugins
                const { nodeTransforms } = context;
                const exitFns = [];
            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 getTransitionInfo has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

            function getTransitionInfo(el, expectedType) {
                const styles = window.getComputedStyle(el);
                // JSDOM may return undefined for transition properties
                const getStyleProperties = (key) => (styles[key] || '').split(', ');
                const transitionDelays = getStyleProperties(TRANSITION + 'Delay');
            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 getGeneratedPropsConstantType has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

            function getGeneratedPropsConstantType(node, context) {
                let returnType = 3 /* CAN_STRINGIFY */;
                const props = getNodeProps(node);
                if (props && props.type === 15 /* JS_OBJECT_EXPRESSION */) {
                        const { properties } = props;
            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 transformSlotOutlet has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

            const transformSlotOutlet = (node, context) => {
                if (isSlotOutlet(node)) {
                        const { children, loc } = node;
                        const { slotName, slotProps } = processSlotOutlet(node, context);
                        const slotArgs = [
            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 injectProp has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
            Open

            function injectProp(node, prop, context) {
                let propsWithInjection;
                const props = node.type === 13 /* VNODE_CALL */ ? node.props : node.arguments[2];
                if (props == null || isString(props)) {
                        propsWithInjection = createObjectExpression([prop]);
            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 setRef has 64 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const setRef = (rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) => {
                if (isArray(rawRef)) {
                        rawRef.forEach((r, i) => setRef(r, oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
                        return;
                }
            Severity: Major
            Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

              Function useHistoryListeners has 64 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function useHistoryListeners(base, historyState, currentLocation, replace) {
                  let listeners = [];
                  let teardowns = [];
                  // TODO: should it be a stack? a Dict. Check if the popstate listener
                  // can trigger twice
              Severity: Major
              Found in cherrydoor/static/js/vue-router.js - About 2 hrs to fix

                Function createMemoryHistory has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function createMemoryHistory(base = "") {
                    let listeners = [];
                    let queue = [START];
                    let position = 0;
                    function setLocation(location) {
                Severity: Major
                Found in cherrydoor/static/js/vue-router.js - About 2 hrs to fix

                  Function createComponentInstance has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function createComponentInstance(vnode, parent, suspense) {
                      const type = vnode.type;
                      // inherit parent app context - or - if root, adopt from root vnode
                      const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
                      const instance = {
                  Severity: Major
                  Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

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

                                setup() {
                                        const instance = currentInstance;
                                        // already resolved
                                        if (resolvedComp) {
                                                return () => createInnerComp(resolvedComp, instance);
                    Severity: Major
                    Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

                      Function parseTag has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function parseTag(context, type, parent) {
                          // Tag open.
                          const start = getCursor(context);
                          const match = /^<\/?([a-z][^\t\r\n\f />]*)/i.exec(context.source);
                          const tag = match[1];
                      Severity: Major
                      Found in cherrydoor/static/js/vue-dev.js - About 2 hrs to fix

                        Function a9e3 has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        /***/ (function(module, exports, __webpack_require__) {
                        
                        "use strict";
                        
                        var DESCRIPTORS = __webpack_require__("83ab");
                        Severity: Major
                        Found in cherrydoor/static/components/VueTimepicker.js - About 2 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language