appbaseio/reactivesearch

View on GitHub

Showing 1,042 of 1,376 total issues

Identical blocks of code found in 39 locations. Consider refactoring.
Open

module.exports = {
    context: path.resolve(__dirname, 'src'),
    entry: {
        main: './index.js',
    },
Severity: Major
Found in packages/web/examples/SingleDropdownList/webpack.config.js and 38 other locations - About 4 hrs to fix
packages/maps/examples/GeoDistanceSlider/webpack.config.js on lines 3..27
packages/maps/examples/ReactiveMap/webpack.config.js on lines 3..27
packages/web/examples/CategorySearch/webpack.config.js on lines 3..27
packages/web/examples/CustomSelectedFilters/webpack.config.js on lines 3..27
packages/web/examples/DataController/webpack.config.js on lines 3..27
packages/web/examples/DataSearch/webpack.config.js on lines 3..27
packages/web/examples/DatePicker/webpack.config.js on lines 3..27
packages/web/examples/DateRange/webpack.config.js on lines 3..27
packages/web/examples/DynamicRangeSlider/webpack.config.js on lines 3..27
packages/web/examples/MultiDataList/webpack.config.js on lines 3..27
packages/web/examples/MultiDropdownList/webpack.config.js on lines 3..27
packages/web/examples/MultiDropdownRange/webpack.config.js on lines 3..27
packages/web/examples/MultiList/webpack.config.js on lines 3..27
packages/web/examples/MultiRange/webpack.config.js on lines 3..27
packages/web/examples/NumberBox/webpack.config.js on lines 3..27
packages/web/examples/RangeInput/webpack.config.js on lines 3..27
packages/web/examples/RangeSlider/webpack.config.js on lines 3..27
packages/web/examples/RatingsFilter/webpack.config.js on lines 3..27
packages/web/examples/ReactiveComponent/webpack.config.js on lines 3..27
packages/web/examples/ReactiveList/webpack.config.js on lines 3..27
packages/web/examples/ResultCard/webpack.config.js on lines 3..27
packages/web/examples/ResultList/webpack.config.js on lines 3..27
packages/web/examples/SelectedFilters/webpack.config.js on lines 3..27
packages/web/examples/SingleDataList/webpack.config.js on lines 3..27
packages/web/examples/SingleDropdownRange/webpack.config.js on lines 3..27
packages/web/examples/SingleList/webpack.config.js on lines 3..27
packages/web/examples/SingleRange/webpack.config.js on lines 3..27
packages/web/examples/TagCloud/webpack.config.js on lines 3..27
packages/web/examples/TextField/webpack.config.js on lines 3..27
packages/web/examples/ToggleButton/webpack.config.js on lines 3..27
packages/web/examples/withRedux/webpack.config.js on lines 3..27
packages/web/examples/withStreaming/webpack.config.js on lines 3..27
site/demos/datalayer/webpack.config.js on lines 3..27
site/demos/goodbooks/webpack.config.js on lines 3..27
site/demos/polygon/webpack.config.js on lines 3..27
site/demos/polyline/webpack.config.js on lines 3..27
site/demos/transport/webpack.config.js on lines 3..27
site/demos/weather/webpack.config.js on lines 3..27

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

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

module.exports = {
    context: path.resolve(__dirname, 'src'),
    entry: {
        main: './index.js',
    },
Severity: Major
Found in packages/web/examples/ResultCard/webpack.config.js and 38 other locations - About 4 hrs to fix
packages/maps/examples/GeoDistanceSlider/webpack.config.js on lines 3..27
packages/maps/examples/ReactiveMap/webpack.config.js on lines 3..27
packages/web/examples/CategorySearch/webpack.config.js on lines 3..27
packages/web/examples/CustomSelectedFilters/webpack.config.js on lines 3..27
packages/web/examples/DataController/webpack.config.js on lines 3..27
packages/web/examples/DataSearch/webpack.config.js on lines 3..27
packages/web/examples/DatePicker/webpack.config.js on lines 3..27
packages/web/examples/DateRange/webpack.config.js on lines 3..27
packages/web/examples/DynamicRangeSlider/webpack.config.js on lines 3..27
packages/web/examples/MultiDataList/webpack.config.js on lines 3..27
packages/web/examples/MultiDropdownList/webpack.config.js on lines 3..27
packages/web/examples/MultiDropdownRange/webpack.config.js on lines 3..27
packages/web/examples/MultiList/webpack.config.js on lines 3..27
packages/web/examples/MultiRange/webpack.config.js on lines 3..27
packages/web/examples/NumberBox/webpack.config.js on lines 3..27
packages/web/examples/RangeInput/webpack.config.js on lines 3..27
packages/web/examples/RangeSlider/webpack.config.js on lines 3..27
packages/web/examples/RatingsFilter/webpack.config.js on lines 3..27
packages/web/examples/ReactiveComponent/webpack.config.js on lines 3..27
packages/web/examples/ReactiveList/webpack.config.js on lines 3..27
packages/web/examples/ResultList/webpack.config.js on lines 3..27
packages/web/examples/SelectedFilters/webpack.config.js on lines 3..27
packages/web/examples/SingleDataList/webpack.config.js on lines 3..27
packages/web/examples/SingleDropdownList/webpack.config.js on lines 3..27
packages/web/examples/SingleDropdownRange/webpack.config.js on lines 3..27
packages/web/examples/SingleList/webpack.config.js on lines 3..27
packages/web/examples/SingleRange/webpack.config.js on lines 3..27
packages/web/examples/TagCloud/webpack.config.js on lines 3..27
packages/web/examples/TextField/webpack.config.js on lines 3..27
packages/web/examples/ToggleButton/webpack.config.js on lines 3..27
packages/web/examples/withRedux/webpack.config.js on lines 3..27
packages/web/examples/withStreaming/webpack.config.js on lines 3..27
site/demos/datalayer/webpack.config.js on lines 3..27
site/demos/goodbooks/webpack.config.js on lines 3..27
site/demos/polygon/webpack.config.js on lines 3..27
site/demos/polyline/webpack.config.js on lines 3..27
site/demos/transport/webpack.config.js on lines 3..27
site/demos/weather/webpack.config.js on lines 3..27

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

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

module.exports = {
    context: path.resolve(__dirname, 'src'),
    entry: {
        main: './index.js',
    },
Severity: Major
Found in packages/web/examples/RatingsFilter/webpack.config.js and 38 other locations - About 4 hrs to fix
packages/maps/examples/GeoDistanceSlider/webpack.config.js on lines 3..27
packages/maps/examples/ReactiveMap/webpack.config.js on lines 3..27
packages/web/examples/CategorySearch/webpack.config.js on lines 3..27
packages/web/examples/CustomSelectedFilters/webpack.config.js on lines 3..27
packages/web/examples/DataController/webpack.config.js on lines 3..27
packages/web/examples/DataSearch/webpack.config.js on lines 3..27
packages/web/examples/DatePicker/webpack.config.js on lines 3..27
packages/web/examples/DateRange/webpack.config.js on lines 3..27
packages/web/examples/DynamicRangeSlider/webpack.config.js on lines 3..27
packages/web/examples/MultiDataList/webpack.config.js on lines 3..27
packages/web/examples/MultiDropdownList/webpack.config.js on lines 3..27
packages/web/examples/MultiDropdownRange/webpack.config.js on lines 3..27
packages/web/examples/MultiList/webpack.config.js on lines 3..27
packages/web/examples/MultiRange/webpack.config.js on lines 3..27
packages/web/examples/NumberBox/webpack.config.js on lines 3..27
packages/web/examples/RangeInput/webpack.config.js on lines 3..27
packages/web/examples/RangeSlider/webpack.config.js on lines 3..27
packages/web/examples/ReactiveComponent/webpack.config.js on lines 3..27
packages/web/examples/ReactiveList/webpack.config.js on lines 3..27
packages/web/examples/ResultCard/webpack.config.js on lines 3..27
packages/web/examples/ResultList/webpack.config.js on lines 3..27
packages/web/examples/SelectedFilters/webpack.config.js on lines 3..27
packages/web/examples/SingleDataList/webpack.config.js on lines 3..27
packages/web/examples/SingleDropdownList/webpack.config.js on lines 3..27
packages/web/examples/SingleDropdownRange/webpack.config.js on lines 3..27
packages/web/examples/SingleList/webpack.config.js on lines 3..27
packages/web/examples/SingleRange/webpack.config.js on lines 3..27
packages/web/examples/TagCloud/webpack.config.js on lines 3..27
packages/web/examples/TextField/webpack.config.js on lines 3..27
packages/web/examples/ToggleButton/webpack.config.js on lines 3..27
packages/web/examples/withRedux/webpack.config.js on lines 3..27
packages/web/examples/withStreaming/webpack.config.js on lines 3..27
site/demos/datalayer/webpack.config.js on lines 3..27
site/demos/goodbooks/webpack.config.js on lines 3..27
site/demos/polygon/webpack.config.js on lines 3..27
site/demos/polyline/webpack.config.js on lines 3..27
site/demos/transport/webpack.config.js on lines 3..27
site/demos/weather/webpack.config.js on lines 3..27

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

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

module.exports = {
    context: path.resolve(__dirname, 'src'),
    entry: {
        main: './index.js',
    },
Severity: Major
Found in packages/web/examples/DataSearch/webpack.config.js and 38 other locations - About 4 hrs to fix
packages/maps/examples/GeoDistanceSlider/webpack.config.js on lines 3..27
packages/maps/examples/ReactiveMap/webpack.config.js on lines 3..27
packages/web/examples/CategorySearch/webpack.config.js on lines 3..27
packages/web/examples/CustomSelectedFilters/webpack.config.js on lines 3..27
packages/web/examples/DataController/webpack.config.js on lines 3..27
packages/web/examples/DatePicker/webpack.config.js on lines 3..27
packages/web/examples/DateRange/webpack.config.js on lines 3..27
packages/web/examples/DynamicRangeSlider/webpack.config.js on lines 3..27
packages/web/examples/MultiDataList/webpack.config.js on lines 3..27
packages/web/examples/MultiDropdownList/webpack.config.js on lines 3..27
packages/web/examples/MultiDropdownRange/webpack.config.js on lines 3..27
packages/web/examples/MultiList/webpack.config.js on lines 3..27
packages/web/examples/MultiRange/webpack.config.js on lines 3..27
packages/web/examples/NumberBox/webpack.config.js on lines 3..27
packages/web/examples/RangeInput/webpack.config.js on lines 3..27
packages/web/examples/RangeSlider/webpack.config.js on lines 3..27
packages/web/examples/RatingsFilter/webpack.config.js on lines 3..27
packages/web/examples/ReactiveComponent/webpack.config.js on lines 3..27
packages/web/examples/ReactiveList/webpack.config.js on lines 3..27
packages/web/examples/ResultCard/webpack.config.js on lines 3..27
packages/web/examples/ResultList/webpack.config.js on lines 3..27
packages/web/examples/SelectedFilters/webpack.config.js on lines 3..27
packages/web/examples/SingleDataList/webpack.config.js on lines 3..27
packages/web/examples/SingleDropdownList/webpack.config.js on lines 3..27
packages/web/examples/SingleDropdownRange/webpack.config.js on lines 3..27
packages/web/examples/SingleList/webpack.config.js on lines 3..27
packages/web/examples/SingleRange/webpack.config.js on lines 3..27
packages/web/examples/TagCloud/webpack.config.js on lines 3..27
packages/web/examples/TextField/webpack.config.js on lines 3..27
packages/web/examples/ToggleButton/webpack.config.js on lines 3..27
packages/web/examples/withRedux/webpack.config.js on lines 3..27
packages/web/examples/withStreaming/webpack.config.js on lines 3..27
site/demos/datalayer/webpack.config.js on lines 3..27
site/demos/goodbooks/webpack.config.js on lines 3..27
site/demos/polygon/webpack.config.js on lines 3..27
site/demos/polyline/webpack.config.js on lines 3..27
site/demos/transport/webpack.config.js on lines 3..27
site/demos/weather/webpack.config.js on lines 3..27

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

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

    componentWillMount() {
        this.props.addComponent(this.props.componentId);
        this.setReact(this.props);

        if (this.props.selectedValue) {
Severity: Major
Found in packages/web/src/components/basic/NumberBox.js and 1 other location - About 4 hrs to fix
packages/web/src/components/range/SingleRange.js on lines 37..46

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

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

    componentWillMount() {
        this.props.addComponent(this.props.componentId);
        this.setReact(this.props);

        if (this.props.selectedValue) {
Severity: Major
Found in packages/web/src/components/range/SingleRange.js and 1 other location - About 4 hrs to fix
packages/web/src/components/basic/NumberBox.js on lines 36..45

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

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.state.searchTerm) {
                                    return String(item.key)
Severity: Major
Found in packages/web/src/components/list/SingleList.js and 5 other locations - About 3 hrs to fix
packages/vue/src/components/list/MultiList.jsx on lines 183..240
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

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

                                {itemsToRender
                                    .filter((item) => {
                                        if (String(item[labelField]).length) {
                                            if (this.props.showSearch && this.state.searchTerm) {
                                                return String(item[labelField])
Severity: Major
Found in packages/web/src/components/shared/Dropdown.js and 5 other locations - About 3 hrs to fix
packages/vue/src/components/list/MultiList.jsx on lines 183..240
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/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

                    {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

                    {itemsToRender
                        .filter((item) => {
                            if (String(item.key).length) {
                                if (this.props.showSearch && this.state.searchTerm) {
                                    return String(item.key)
Severity: Major
Found in packages/web/src/components/list/MultiList.js and 5 other locations - About 3 hrs to fix
packages/vue/src/components/list/MultiList.jsx on lines 183..240
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/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

                                    {itemsToRender
                                        .filter(item => {
                                            if (String(item[labelField]).length) {
                                                if (this.$props.showSearch && this.$data.searchTerm) {
                                                    return String(item[labelField])
Severity: Major
Found in packages/vue/src/components/shared/DropDown.jsx and 5 other locations - About 3 hrs to fix
packages/vue/src/components/list/MultiList.jsx on lines 183..240
packages/vue/src/components/list/SingleList.jsx on lines 169..232
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

                    {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/SingleList.jsx and 5 other locations - About 3 hrs to fix
packages/vue/src/components/list/MultiList.jsx on lines 183..240
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

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

    updateQueryOptions = (props) => {
        const queryOptions = getQueryOptions(props);
        queryOptions.size = 0;
        queryOptions.aggs = {
            [props.dataField]: {
Severity: Major
Found in packages/native/src/components/list/SingleDropdownList.js and 1 other location - About 3 hrs to fix
packages/native/src/components/list/MultiDropdownList.js on lines 230..243

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

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

    updateQueryOptions = (props) => {
        const queryOptions = getQueryOptions(props);
        queryOptions.size = 0;
        queryOptions.aggs = {
            [props.dataField]: {
Severity: Major
Found in packages/native/src/components/list/MultiDropdownList.js and 1 other location - About 3 hrs to fix
packages/native/src/components/list/SingleDropdownList.js on lines 143..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 112.

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

        if (this.props.defaultSelected !== nextProps.defaultSelected) {
            this.setValue(nextProps.defaultSelected, true, nextProps);
        } else if (
            // since, selectedValue will be updated when currentValue changes,
            // we must only check for the changes introduced by
Severity: Major
Found in packages/web/src/components/search/DataSearch.js and 2 other locations - About 3 hrs to fix
packages/web/src/components/basic/TextField.js on lines 57..68
packages/web/src/components/search/CategorySearch.js on lines 115..126

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

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

        if (this.props.defaultSelected !== nextProps.defaultSelected) {
            this.setValue(nextProps.defaultSelected, true, nextProps);
        } else if (
            // since, selectedValue will be updated when currentValue changes,
            // we must only check for the changes introduced by
Severity: Major
Found in packages/web/src/components/basic/TextField.js and 2 other locations - About 3 hrs to fix
packages/web/src/components/search/CategorySearch.js on lines 115..126
packages/web/src/components/search/DataSearch.js on lines 102..113

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

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

        if (this.props.defaultSelected !== nextProps.defaultSelected) {
            this.setValue(nextProps.defaultSelected, true, nextProps);
        } else if (
            // since, selectedValue will be updated when currentValue changes,
            // we must only check for the changes introduced by
Severity: Major
Found in packages/web/src/components/search/CategorySearch.js and 2 other locations - About 3 hrs to fix
packages/web/src/components/basic/TextField.js on lines 57..68
packages/web/src/components/search/DataSearch.js on lines 102..113

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

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

        } else if (this.props.defaultSelected && this.props.defaultSelected.location) {
            this.setState(
                {
                    currentLocation: this.props.defaultSelected.location,
                },
Severity: Major
Found in packages/maps/src/components/basic/GeoDistanceSlider.js and 1 other location - About 3 hrs to fix
packages/maps/src/components/basic/GeoDistanceSlider.js on lines 62..88

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

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 (this.props.selectedValue && this.props.selectedValue.location) {
            this.setState(
                {
                    currentLocation: this.props.selectedValue.location,
                },
Severity: Major
Found in packages/maps/src/components/basic/GeoDistanceSlider.js and 1 other location - About 3 hrs to fix
packages/maps/src/components/basic/GeoDistanceSlider.js on lines 75..88

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

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

                    {result.title
                        && (typeof result.title === 'string' ? (
                            <Title
                                dangerouslySetInnerHTML={{ __html: result.title }}
                                className={getClassName(this.props.innerClass, 'title')}
Severity: Major
Found in packages/web/src/components/result/ResultCard.js and 1 other location - About 3 hrs to fix
packages/web/src/components/result/ResultList.js on lines 36..48

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

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

Severity
Category
Status
Source
Language