appbaseio/reactivesearch

View on GitHub

Showing 1,376 of 1,376 total issues

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/maps/src/components/result/ReactiveMap.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/CategorySearch.js on lines 129..132
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/web/src/components/search/CategorySearch.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/web/src/components/basic/TagCloud.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/CategorySearch.js on lines 129..132
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/web/src/components/list/SingleDataList.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/CategorySearch.js on lines 129..132
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/web/src/components/list/MultiList.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/CategorySearch.js on lines 129..132
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/native/src/components/list/MultiDropdownList.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/CategorySearch.js on lines 129..132
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/web/src/components/list/SingleDropdownList.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/CategorySearch.js on lines 129..132
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

const mapStateToProps = (state, props) => ({
    categories:
        (state.aggregations[props.componentId]
            && state.aggregations[props.componentId][props.categoryField]
            && state.aggregations[props.componentId][props.categoryField].buckets)
Severity: Minor
Found in packages/web/src/components/search/CategorySearch.js - About 45 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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/native/src/components/search/DataSearch.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/CategorySearch.js on lines 129..132
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/web/src/components/list/MultiDataList.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/CategorySearch.js on lines 129..132
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/web/src/components/search/DataSearch.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/CategorySearch.js on lines 129..132

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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/web/src/components/list/SingleList.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/CategorySearch.js on lines 129..132
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/web/src/components/list/MultiDropdownList.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/CategorySearch.js on lines 129..132
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/maps-native/src/components/maps/ReactiveMap.js and 15 other locations - About 45 mins to fix
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/CategorySearch.js on lines 129..132
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/native/src/components/list/SingleDropdownList.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/range/RangeSlider.js on lines 110..113
packages/web/src/components/search/CategorySearch.js on lines 129..132
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

    componentWillUnmount() {
        this.props.removeComponent(this.props.componentId);
        this.props.removeComponent(this.internalComponent);
    }
Severity: Major
Found in packages/web/src/components/range/RangeSlider.js and 15 other locations - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 210..213
packages/maps/src/components/result/ReactiveMap.js on lines 345..348
packages/native/src/components/list/MultiDropdownList.js on lines 94..97
packages/native/src/components/list/SingleDropdownList.js on lines 78..81
packages/native/src/components/range/RangeSlider.js on lines 105..108
packages/native/src/components/search/DataSearch.js on lines 103..106
packages/web/src/components/basic/TagCloud.js on lines 92..95
packages/web/src/components/list/MultiDataList.js on lines 100..103
packages/web/src/components/list/MultiDropdownList.js on lines 118..121
packages/web/src/components/list/MultiList.js on lines 112..115
packages/web/src/components/list/SingleDataList.js on lines 88..91
packages/web/src/components/list/SingleDropdownList.js on lines 107..110
packages/web/src/components/list/SingleList.js on lines 103..106
packages/web/src/components/search/CategorySearch.js on lines 129..132
packages/web/src/components/search/DataSearch.js on lines 116..119

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

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

                <Button
                    key={i - 1}
                    onPress={() => this.setPage(i - 1)}
                    light={this.state.currentPage !== i - 1}
                    style={{
Severity: Minor
Found in packages/maps-native/src/components/maps/ReactiveMap.js and 1 other location - About 45 mins to fix
packages/native/src/components/result/ReactiveList.js on lines 335..352

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

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

                <Button
                    key={i - 1}
                    onPress={() => this.setPage(i - 1)}
                    light={this.state.currentPage !== i - 1}
                    style={{
Severity: Minor
Found in packages/native/src/components/result/ReactiveList.js and 1 other location - About 45 mins to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 518..534

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

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

            props.updateQuery({
                componentId: this.internalComponent,
                query: query([props.range.start, props.range.end], props),
            });
Severity: Minor
Found in packages/native/src/components/range/RangeSlider.js and 1 other location - About 45 mins to fix
packages/web/src/components/range/RangeSlider.js on lines 279..282

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

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

        const credentials
            = props.url && props.url.trim() !== '' && !props.credentials ? null : props.credentials;
Severity: Major
Found in packages/web/src/components/basic/ReactiveBase.js and 3 other locations - About 45 mins to fix
packages/native/src/components/basic/ReactiveBase.js on lines 26..27
packages/vue/src/components/ReactiveBase/index.jsx on lines 75..78
packages/web/src/server/index.js on lines 74..76

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

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