appbaseio/reactivesearch

View on GitHub

Showing 1,042 of 1,376 total issues

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

        if (nextProps.pagination && nextProps.total !== this.props.total) {
            this.setState({
                totalPages: Math.ceil(nextProps.total / nextProps.size),
                currentPage: this.props.total ? 0 : this.state.currentPage,
            });
Severity: Major
Found in packages/maps-native/src/components/maps/ReactiveMap.js and 1 other location - About 3 hrs to fix
packages/maps/src/components/result/ReactiveMap.js on lines 287..292

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/native/src/components/list/SingleDropdownList.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/CategorySearch.js on lines 144..154
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/web/src/components/list/MultiDropdownList.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/CategorySearch.js on lines 144..154
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/native/src/components/range/RangeSlider.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/CategorySearch.js on lines 144..154
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/native/src/components/list/MultiDropdownList.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/CategorySearch.js on lines 144..154
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/maps/src/components/result/ReactiveMap.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/CategorySearch.js on lines 144..154
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/web/src/components/list/SingleList.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/CategorySearch.js on lines 144..154
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/web/src/components/range/RangeSlider.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/search/CategorySearch.js on lines 144..154
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/web/src/components/search/DataSearch.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/CategorySearch.js on lines 144..154

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/native/src/components/search/DataSearch.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/CategorySearch.js on lines 144..154
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/native/src/components/result/ReactiveList.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/CategorySearch.js on lines 144..154
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/web/src/components/list/MultiList.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/CategorySearch.js on lines 144..154
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/web/src/components/basic/TagCloud.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/CategorySearch.js on lines 144..154
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/web/src/components/list/SingleDropdownList.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/CategorySearch.js on lines 144..154
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/maps-native/src/components/maps/ReactiveMap.js and 14 other locations - About 2 hrs to fix
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/CategorySearch.js on lines 144..154
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

    setReact = (props) => {
        const { react } = props;
        if (react) {
            const newReact = pushToAndClause(react, this.internalComponent);
            props.watchComponent(props.componentId, newReact);
Severity: Major
Found in packages/web/src/components/search/CategorySearch.js and 14 other locations - About 2 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 215..223
packages/maps/src/components/result/ReactiveMap.js on lines 350..358
packages/native/src/components/list/MultiDropdownList.js on lines 99..107
packages/native/src/components/list/SingleDropdownList.js on lines 83..91
packages/native/src/components/range/RangeSlider.js on lines 110..118
packages/native/src/components/result/ReactiveList.js on lines 241..249
packages/native/src/components/search/DataSearch.js on lines 108..116
packages/web/src/components/basic/TagCloud.js on lines 97..107
packages/web/src/components/list/MultiDropdownList.js on lines 123..133
packages/web/src/components/list/MultiList.js on lines 117..127
packages/web/src/components/list/SingleDropdownList.js on lines 112..122
packages/web/src/components/list/SingleList.js on lines 108..118
packages/web/src/components/range/RangeSlider.js on lines 115..125
packages/web/src/components/search/DataSearch.js on lines 121..131

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

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

            <div className="col">
                <SelectedFilters />
                <ReactiveMap
                    componentId="map"
                    dataField="location"
Severity: Major
Found in packages/maps/examples/GeoDistanceSlider/src/index.js and 1 other location - About 2 hrs to fix
packages/maps/examples/GeoDistanceDropdown/src/index.js on lines 39..52

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

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

            <div className="col">
                <SelectedFilters />
                <ReactiveMap
                    componentId="map"
                    dataField="location"
Severity: Major
Found in packages/maps/examples/GeoDistanceDropdown/src/index.js and 1 other location - About 2 hrs to fix
packages/maps/examples/GeoDistanceSlider/src/index.js on lines 37..50

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

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

        <Flex flexWrap justifyContent="center">
            {
                data.topics.slice(0, 7)
                    .map(item =>
                        (
Severity: Major
Found in site/demos/gitxplore/src/components/Results.js and 1 other location - About 2 hrs to fix
site/demos/gitxplore-dark/src/components/Results.js on lines 31..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 93.

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

        <Flex flexWrap justifyContent="center">
            {
                data.topics.slice(0, 7)
                    .map(item =>
                        (
Severity: Major
Found in site/demos/gitxplore-dark/src/components/Results.js and 1 other location - About 2 hrs to fix
site/demos/gitxplore/src/components/Results.js on lines 31..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 93.

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