appbaseio/reactivesearch

View on GitHub
packages/vue/src/components/list/MultiList.jsx

Summary

Maintainability
F
1 wk
Test Coverage

File MultiList.jsx has 479 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Actions, helper } from '@appbaseio/reactivecore';
import VueTypes from 'vue-types';
import Title from '../../styles/Title';
import Input from '../../styles/Input';
import Container from '../../styles/Container';
Severity: Minor
Found in packages/vue/src/components/list/MultiList.jsx - About 7 hrs to fix

    Function render has 105 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        render() {
            const { selectAllLabel, renderListItem } = this.$props;
    
            const renderListItemCalc
                = this.$scopedSlots.renderListItem || renderListItem;
    Severity: Major
    Found in packages/vue/src/components/list/MultiList.jsx - About 4 hrs to fix

      Function defaultQuery has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
      Open

      MultiList.defaultQuery = (value, props) => {
          let query = null;
          const type = props.queryFormat === 'or' ? 'terms' : 'term';
      
          if (!Array.isArray(value) || value.length === 0) {
      Severity: Minor
      Found in packages/vue/src/components/list/MultiList.jsx - 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 defaultQuery has 65 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      MultiList.defaultQuery = (value, props) => {
          let query = null;
          const type = props.queryFormat === 'or' ? 'terms' : 'term';
      
          if (!Array.isArray(value) || value.length === 0) {
      Severity: Major
      Found in packages/vue/src/components/list/MultiList.jsx - About 2 hrs to fix

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

                setValue(value, isDefaultValue = false, props = this.$props) {
                    // ignore state updates when component is locked
                    if (props.beforeValueChange && this.locked) {
                        return;
                    }
        Severity: Major
        Found in packages/vue/src/components/list/MultiList.jsx - About 2 hrs to fix

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

                  setValue(value, isDefaultValue = false, props = this.$props) {
                      // ignore state updates when component is locked
                      if (props.beforeValueChange && this.locked) {
                          return;
                      }
          Severity: Minor
          Found in packages/vue/src/components/list/MultiList.jsx - 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

          Avoid deeply nested control flow statements.
          Open

                          if (hasMissingTerm) {
                              should = should.concat({
                                  bool: {
                                      must_not: {
                                          exists: { field: props.dataField }
          Severity: Major
          Found in packages/vue/src/components/list/MultiList.jsx - About 45 mins to fix

            Function render has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                render() {
                    const { selectAllLabel, renderListItem } = this.$props;
            
                    const renderListItemCalc
                        = this.$scopedSlots.renderListItem || renderListItem;
            Severity: Minor
            Found in packages/vue/src/components/list/MultiList.jsx - About 25 mins 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

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

                        if (
                            selectAllLabel
                            && ((Array.isArray(value) && value.includes(selectAllLabel))
                                || (typeof value === 'string' && value === selectAllLabel))
                        ) {
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 1 other location - About 1 day to fix
            packages/web/src/components/list/MultiList.js on lines 233..274

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

            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

                    selectedValue(newVal) {
                        let selectedValue = Object.keys(this.$data.currentValue);
            
                        if (this.$props.selectAllLabel) {
                            selectedValue = selectedValue.filter(
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 1 other location - About 5 hrs to fix
            packages/vue/src/components/list/MultiDropdownList.jsx on lines 101..114

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

            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

                beforeMount() {
                    this.addComponent(this.internalComponent);
                    this.addComponent(this.$props.componentId);
                    this.updateQueryHandlerOptions(this.$props);
                    this.setReact(this.$props);
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 2 other locations - About 4 hrs to fix
            packages/vue/src/components/list/SingleDropdownList.jsx on lines 76..87
            packages/vue/src/components/list/SingleList.jsx on lines 73..84

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

            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

            MultiList.generateQueryOptions = props => {
                const queryOptions = getQueryOptions(props);
                queryOptions.size = 0;
                queryOptions.aggs = {
                    [props.dataField]: {
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 1 other location - About 4 hrs to fix
            packages/vue/src/components/list/SingleList.jsx on lines 348..362

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

            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

                    renderSearch() {
                        if (this.$props.showSearch) {
                            return (
                                <Input
                                    class={getClassName(this.$props.innerClass, 'input') || ''}
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 1 other location - About 4 hrs to fix
            packages/vue/src/components/list/SingleList.jsx on lines 323..340

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

            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

                    generateQueryOptions(props) {
                        const queryOptions = getQueryOptions(props);
                        queryOptions.size = 0;
                        queryOptions.aggs = {
                            [props.dataField]: {
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 1 other location - About 4 hrs to fix
            packages/vue/src/components/list/SingleList.jsx on lines 293..311

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

            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 6 locations. Consider refactoring.
            Open

                                {itemsToRender
                                    .filter(item => {
                                        if (String(item.key).length) {
                                            if (this.$props.showSearch && this.$data.searchTerm) {
                                                return String(item.key)
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 5 other locations - About 3 hrs to fix
            packages/vue/src/components/list/SingleList.jsx on lines 169..232
            packages/vue/src/components/shared/DropDown.jsx on lines 113..194
            packages/web/src/components/shared/Dropdown.js on lines 155..231
            packages/web/src/components/list/MultiList.js on lines 413..466
            packages/web/src/components/list/SingleList.js on lines 323..377

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

            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 6 locations. Consider refactoring.
            Open

                    updateQueryHandler(value, props) {
                        const query = props.customQuery || MultiList.defaultQuery;
                        this.updateQuery({
                            componentId: props.componentId,
                            query: query(value, props),
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 5 other locations - About 3 hrs to fix
            packages/vue/src/components/list/MultiDropdownList.jsx on lines 302..313
            packages/vue/src/components/list/SingleDropdownList.jsx on lines 239..250
            packages/vue/src/components/list/SingleList.jsx on lines 280..291
            packages/vue/src/components/range/MultiRange.jsx on lines 91..102
            packages/vue/src/components/range/SingleRange.jsx on lines 145..156

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

            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 5 locations. Consider refactoring.
            Open

                    setReact(props) {
                        const { react } = props;
            
                        if (react) {
                            const newReact = pushToAndClause(react, this.internalComponent);
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 4 other locations - About 2 hrs to fix
            packages/vue/src/components/list/MultiDropdownList.jsx on lines 216..227
            packages/vue/src/components/list/SingleDropdownList.jsx on lines 203..214
            packages/vue/src/components/list/SingleList.jsx on lines 239..250
            packages/vue/src/components/result/ReactiveList.jsx on lines 411..422

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

            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 7 locations. Consider refactoring.
            Open

                created() {
                    const onQueryChange = (...args) => {
                        this.$emit('queryChange', ...args);
                    };
                    this.setQueryListener(this.$props.componentId, onQueryChange, null);
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 6 other locations - About 1 hr to fix
            packages/vue/src/components/list/MultiDropdownList.jsx on lines 72..77
            packages/vue/src/components/list/SingleDropdownList.jsx on lines 70..75
            packages/vue/src/components/list/SingleList.jsx on lines 67..72
            packages/vue/src/components/range/MultiRange.jsx on lines 122..127
            packages/vue/src/components/range/RangeSlider.jsx on lines 125..130
            packages/vue/src/components/range/SingleRange.jsx on lines 38..43

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

            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 4 locations. Consider refactoring.
            Open

                            {this.$props.title && (
                                <Title class={getClassName(this.$props.innerClass, 'title')}>
                                    {this.$props.title}
                                </Title>
                            )}
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 3 other locations - About 1 hr to fix
            packages/vue/src/components/range/MultiRange.jsx on lines 146..150
            packages/vue/src/components/range/RangeSlider.jsx on lines 156..160
            packages/vue/src/components/range/SingleRange.jsx on lines 78..82

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

            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

                    options(newVal) {
                        this.modifiedOptions = newVal[this.$props.dataField]
                            ? newVal[this.$props.dataField].buckets
                            : [];
                    },
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 1 other location - About 1 hr to fix
            packages/vue/src/components/list/SingleList.jsx on lines 94..98

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

            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 4 locations. Consider refactoring.
            Open

                                        <li
                                            key={item.key}
                                            class={`${this.$data.currentValue[item.key] ? 'active' : ''}`}
                                        >
                                            <Checkbox
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 3 other locations - About 55 mins to fix
            packages/web/src/components/list/MultiDataList.js on lines 380..419
            packages/web/src/components/list/MultiList.js on lines 426..465
            packages/web/src/components/range/MultiRange.js on lines 201..220

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

            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

                        modifiedOptions:
                            props.options && props.options[props.dataField]
                                ? props.options[props.dataField].buckets
                                : [],
            Severity: Minor
            Found in packages/vue/src/components/list/MultiList.jsx and 2 other locations - About 40 mins to fix
            packages/vue/src/components/list/SingleList.jsx on lines 57..60
            packages/web/src/components/basic/TagCloud.js on lines 36..39

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

            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 4 locations. Consider refactoring.
            Open

                    dataField() {
                        this.updateQueryHandlerOptions(this.$props);
                        this.updateQueryHandler(this.$data.currentValue, this.$props);
                    },
            Severity: Major
            Found in packages/vue/src/components/list/MultiList.jsx and 3 other locations - About 35 mins to fix
            packages/vue/src/components/list/MultiDropdownList.jsx on lines 146..149
            packages/vue/src/components/list/SingleDropdownList.jsx on lines 128..131
            packages/vue/src/components/list/SingleList.jsx on lines 105..108

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

            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

            There are no issues that match your filters.

            Category
            Status