oplik0/cherrydoor

View on GitHub

Showing 650 of 650 total issues

Function parseForExpression has 50 lines of code (exceeds 25 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 2 hrs to fix

    Function transformText has 50 lines of code (exceeds 25 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 2 hrs to fix

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

          setup(props, { slots }) {
              const link = reactive(useLink(props));
              const { options } = inject(routerKey);
              const elClass = computed(() => ({
                  [getLinkClass(
      Severity: Minor
      Found in cherrydoor/static/js/vue-router.js - About 1 hr to fix

        Function setupListeners has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function setupListeners() {
                removeHistoryListener = routerHistory.listen((to, _from, info) => {
                    // cannot be a redirect route because it was in history
                    let toLocation = resolve(to);
                    // due to dynamic routing, and to hash history with manual navigation
        Severity: Minor
        Found in cherrydoor/static/js/vue-router.js - About 1 hr to fix

          Function renderRangeList has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              renderRangeList: function renderRangeList(rawRange, section) {
                var _this10 = this;
          
                if (!rawRange || !section || !this.isMinuteOrSecond(section)) {
                  return [];
          Severity: Minor
          Found in cherrydoor/static/components/VueTimepicker.js - About 1 hr to fix

            Function _createForOfIteratorHelper has 49 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function _createForOfIteratorHelper(o, allowArrayLike) {
              var it;
            
              if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
                if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
            Severity: Minor
            Found in cherrydoor/static/components/VueTimepicker.js - About 1 hr to fix

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

                  ["WATCH_ARRAY" /* WATCH_ARRAY */]: {
                          message: `"watch" option or vm.$watch on an array value will no longer ` +
                                  `trigger on array mutation unless the "deep" option is specified. ` +
                                  `If current usage is intended, you can disable the compat behavior and ` +
                                  `suppress this warning with:` +
              Severity: Major
              Found in cherrydoor/static/js/vue-dev.js and 1 other location - About 1 hr to fix
              cherrydoor/static/js/vue-dev.js on lines 2042..2049

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

              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

                  ["TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */]: {
                          message: `<TransitionGroup> no longer renders a root <span> element by ` +
                                  `default if no "tag" prop is specified. If you do not rely on the span ` +
                                  `for styling, you can disable the compat behavior and suppress this ` +
                                  `warning with:` +
              Severity: Major
              Found in cherrydoor/static/js/vue-dev.js and 1 other location - About 1 hr to fix
              cherrydoor/static/js/vue-dev.js on lines 1993..2000

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

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

                  const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
                          const { el, type, transition, children, shapeFlag } = vnode;
                          if (shapeFlag & 6 /* COMPONENT */) {
                                  move(vnode.component.subTree, container, anchor, moveType);
                                  return;
              Severity: Minor
              Found in cherrydoor/static/js/vue-dev.js - About 1 hr to fix

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

                function cloneVNode(vnode, extraProps, mergeRef = false) {
                    // This is intentionally NOT using spread or extend to avoid the runtime
                    // key enumeration cost.
                    const { props, ref, patchFlag, children } = vnode;
                    const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
                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 createRootCodegen has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                Open

                function createRootCodegen(root, context) {
                    const { helper, removeHelper } = context;
                    const { children } = root;
                    if (children.length === 1) {
                            const child = children[0];
                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 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
                    Severity
                    Category
                    Status
                    Source
                    Language