oplik0/cherrydoor

View on GitHub

Showing 556 of 650 total issues

Function transformExpression has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

const transformExpression = (node, context) => {
    if (node.type === 5 /* INTERPOLATION */) {
            node.content = processExpression(node.content, context);
    }
    else if (node.type === 1 /* ELEMENT */) {
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 compileToFunction has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function compileToFunction(template, options) {
    if (!isString(template)) {
            if (template.nodeType) {
                    template = template.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 normalizeEmitsOptions has a Cognitive Complexity of 15 (exceeds 5 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

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

function useHistoryStateNavigation(base) {
    const { history, location } = window;
    // private variables
    let currentLocation = {
        value: createCurrentLocation(base, location),
Severity: Minor
Found in cherrydoor/static/js/vue-router.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 normalizeQuery has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function normalizeQuery(query) {
    const normalizedQuery = {};
    for (let key in query) {
        let value = query[key];
        if (value !== undefined) {
Severity: Minor
Found in cherrydoor/static/js/vue-router.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 isEnd has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function isEnd(context, mode, ancestors) {
    const s = context.source;
    switch (mode) {
            case 0 /* DATA */:
                    if (startsWith(s, '</')) {
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 normalizeStyle has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function normalizeStyle(value) {
    if (isArray(value)) {
            const res = {};
            for (let i = 0; i < value.length; i++) {
                    const item = value[i];
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 useLink has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function useLink(props) {
    const router = inject(routerKey);
    const currentRoute = inject(routeLocationKey);
    const route = computed(() => router.resolve(unref(props.to)));
    const activeRecordIndex = computed(() => {
Severity: Minor
Found in cherrydoor/static/js/vue-router.js - About 1 hr to fix

    Function scrollToPosition has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function scrollToPosition(position) {
        let scrollToOptions;
        if ("el" in position) {
            let positionEl = position.el;
            const isIdSelector =
    Severity: Minor
    Found in cherrydoor/static/js/vue-router.js - About 1 hr to fix

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

        Function hourRangeIn24HrFormat has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            hourRangeIn24HrFormat: function hourRangeIn24HrFormat() {
              var _this2 = this;
        
              if (!this.hourType || !this.opts.hourRange) {
                return false;
        Severity: Minor
        Found in cherrydoor/static/components/VueTimepicker.js - About 1 hr to fix

          Function 99af has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          /***/ (function(module, exports, __webpack_require__) {
          
          "use strict";
          
          var $ = __webpack_require__("23e7");
          Severity: Minor
          Found in cherrydoor/static/components/VueTimepicker.js - About 1 hr to fix

            Function b727 has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            /***/ (function(module, exports, __webpack_require__) {
            
            var bind = __webpack_require__("0366");
            var IndexedObject = __webpack_require__("44ad");
            var toObject = __webpack_require__("7b0b");
            Severity: Minor
            Found in cherrydoor/static/components/VueTimepicker.js - About 1 hr to fix

              Function shouldUpdateComponent has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
                  const { props: prevProps, children: prevChildren, component } = prevVNode;
                  const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
                  const emits = component.emitsOptions;
                  // Parent component's render function was hot-updated. Since this may have
              Severity: Minor
              Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

                Function debugLog has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    debugLog: function debugLog(logText) {
                      var _this20 = this;
                
                      if (!logText || !logText.length) {
                        return;
                Severity: Minor
                Found in cherrydoor/static/components/VueTimepicker.js - About 1 hr to fix

                  Function cmd_enter has 45 lines of code (exceeds 25 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

                    Function patchDOMProp has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function patchDOMProp(el, key, value, 
                    // the following args are passed only due to potential innerHTML/textContent
                    // overriding existing VNodes, in which case the old tree must be properly
                    // unmounted.
                    prevChildren, parentComponent, parentSuspense, unmountChildren) {
                    Severity: Minor
                    Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

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

                      /***/ (function(module, exports, __webpack_require__) {
                      
                      "use strict";
                      
                      var DESCRIPTORS = __webpack_require__("83ab");
                      Severity: Minor
                      Found in cherrydoor/static/components/VueTimepicker.js - About 1 hr to fix

                        Function splice has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          splice: function splice(start, deleteCount /* , ...items */) {
                            var O = toObject(this);
                            var len = toLength(O.length);
                            var actualStart = toAbsoluteIndex(start, len);
                            var argumentsLength = arguments.length;
                        Severity: Minor
                        Found in cherrydoor/static/components/VueTimepicker.js - About 1 hr to fix

                          Function parseForExpression has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function parseForExpression(input, context) {
                              const loc = input.loc;
                              const exp = input.content;
                              const inMatch = exp.match(forAliasRE);
                              if (!inMatch)
                          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

                          Severity
                          Category
                          Status
                          Source
                          Language