appbaseio/reactivesearch

View on GitHub

Showing 1,042 of 1,376 total issues

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    from: 0,
    size: 10,
Severity: Major
Found in packages/web/examples/ssr/pages/rangeinput.js and 10 other locations - About 1 hr to fix
packages/web/examples/ssr-with-react-dom/client/index.js on lines 31..40
packages/web/examples/ssr-with-react-dom/server/server.js on lines 42..51
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 29..38
packages/web/examples/ssr/pages/multidropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/multirange.js on lines 26..35
packages/web/examples/ssr/pages/querystring.js on lines 31..40
packages/web/examples/ssr/pages/rangeslider.js on lines 37..46
packages/web/examples/ssr/pages/ratingsfilter.js on lines 34..43
packages/web/examples/ssr/pages/singledropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/singlerange.js on lines 31..40

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    from: 0,
    size: 10,
Severity: Major
Found in packages/web/examples/ssr/pages/multidropdownrange.js and 10 other locations - About 1 hr to fix
packages/web/examples/ssr-with-react-dom/client/index.js on lines 31..40
packages/web/examples/ssr-with-react-dom/server/server.js on lines 42..51
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 29..38
packages/web/examples/ssr/pages/multirange.js on lines 26..35
packages/web/examples/ssr/pages/querystring.js on lines 31..40
packages/web/examples/ssr/pages/rangeinput.js on lines 32..41
packages/web/examples/ssr/pages/rangeslider.js on lines 37..46
packages/web/examples/ssr/pages/ratingsfilter.js on lines 34..43
packages/web/examples/ssr/pages/singledropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/singlerange.js on lines 31..40

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    from: 0,
    size: 10,
Severity: Major
Found in packages/web/examples/ssr/pages/singledropdownrange.js and 10 other locations - About 1 hr to fix
packages/web/examples/ssr-with-react-dom/client/index.js on lines 31..40
packages/web/examples/ssr-with-react-dom/server/server.js on lines 42..51
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 29..38
packages/web/examples/ssr/pages/multidropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/multirange.js on lines 26..35
packages/web/examples/ssr/pages/querystring.js on lines 31..40
packages/web/examples/ssr/pages/rangeinput.js on lines 32..41
packages/web/examples/ssr/pages/rangeslider.js on lines 37..46
packages/web/examples/ssr/pages/ratingsfilter.js on lines 34..43
packages/web/examples/ssr/pages/singlerange.js on lines 31..40

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    from: 0,
    size: 10,
Severity: Major
Found in packages/web/examples/ssr/pages/multirange.js and 10 other locations - About 1 hr to fix
packages/web/examples/ssr-with-react-dom/client/index.js on lines 31..40
packages/web/examples/ssr-with-react-dom/server/server.js on lines 42..51
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 29..38
packages/web/examples/ssr/pages/multidropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/querystring.js on lines 31..40
packages/web/examples/ssr/pages/rangeinput.js on lines 32..41
packages/web/examples/ssr/pages/rangeslider.js on lines 37..46
packages/web/examples/ssr/pages/ratingsfilter.js on lines 34..43
packages/web/examples/ssr/pages/singledropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/singlerange.js on lines 31..40

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    from: 0,
    size: 10,
Severity: Major
Found in packages/web/examples/ssr/pages/querystring.js and 10 other locations - About 1 hr to fix
packages/web/examples/ssr-with-react-dom/client/index.js on lines 31..40
packages/web/examples/ssr-with-react-dom/server/server.js on lines 42..51
packages/web/examples/ssr/pages/dynamicrangeslider.js on lines 29..38
packages/web/examples/ssr/pages/multidropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/multirange.js on lines 26..35
packages/web/examples/ssr/pages/rangeinput.js on lines 32..41
packages/web/examples/ssr/pages/rangeslider.js on lines 37..46
packages/web/examples/ssr/pages/ratingsfilter.js on lines 34..43
packages/web/examples/ssr/pages/singledropdownrange.js on lines 31..40
packages/web/examples/ssr/pages/singlerange.js on lines 31..40

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        checkSomePropChange(
            this.props,
            nextProps,
            ['highlight', 'dataField', 'highlightField'],
            () => {
Severity: Major
Found in packages/web/src/components/search/CategorySearch.js and 1 other location - About 1 hr to fix
packages/web/src/components/search/DataSearch.js on lines 70..79

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        checkSomePropChange(
            this.props,
            nextProps,
            ['highlight', 'dataField', 'highlightField'],
            () => {
Severity: Major
Found in packages/web/src/components/search/DataSearch.js and 1 other location - About 1 hr to fix
packages/web/src/components/search/CategorySearch.js on lines 83..92

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

const dark = ({ theme }) => css`
    background-color: ${theme.colors.backgroundColor};
    border-color: ${theme.colors.borderColor};
    color: ${theme.colors.textColor};

Severity: Major
Found in packages/vue/src/styles/Select.js and 1 other location - About 1 hr to fix
packages/web/src/styles/Select.js on lines 11..19

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    decrementValue = () => {
        if (this.state.currentValue === this.props.data.start) {
            return;
        }
        const { currentValue } = this.state;
Severity: Major
Found in packages/web/src/components/basic/NumberBox.js and 1 other location - About 1 hr to fix
packages/web/src/components/basic/NumberBox.js on lines 116..122

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    incrementValue = () => {
        if (this.state.currentValue === this.props.data.end) {
            return;
        }
        const { currentValue } = this.state;
Severity: Major
Found in packages/web/src/components/basic/NumberBox.js and 1 other location - About 1 hr to fix
packages/web/src/components/basic/NumberBox.js on lines 124..130

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

            if (!currentComponents.length) {
                Array.from(this.params.keys()).forEach((item) => {
                    this.params.delete(item);
                });
                this.pushToHistory();
Severity: Major
Found in packages/web/src/components/basic/URLParamsProvider.js and 1 other location - About 1 hr to fix
packages/vue/src/components/URLParamsProvider.jsx on lines 71..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 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                if (!currentComponents.length) {
                    Array.from(this.$params.keys()).forEach(item => {
                        this.$params.delete(item);
                    });
                    this.pushToHistory();
Severity: Major
Found in packages/vue/src/components/URLParamsProvider.jsx and 1 other location - About 1 hr to fix
packages/web/src/components/basic/URLParamsProvider.js on lines 92..97

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

const dark = ({ theme }) => css`
    background-color: ${theme.colors.backgroundColor};
    border-color: ${theme.colors.borderColor};
    color: ${theme.colors.textColor};

Severity: Major
Found in packages/web/src/styles/Select.js and 1 other location - About 1 hr to fix
packages/vue/src/styles/Select.js on lines 12..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                <Modal
                    supportedOrientations={this.props.supportedOrientations || null}
                    transparent={false}
                    visible={this.state.showModal}
                    onRequestClose={this.toggleModal}
Severity: Major
Found in packages/native/src/components/date/DateRange.js and 4 other locations - About 1 hr to fix
packages/native/src/components/date/DatePicker.js on lines 207..298
packages/native/src/components/list/MultiDropdownList.js on lines 263..325
packages/native/src/components/range/MultiDropdownRange.js on lines 181..252
packages/native/src/components/search/DataSearch.js on lines 337..441

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                    <Modal
                        supportedOrientations={this.props.supportedOrientations || null}
                        transparent={false}
                        visible={this.state.showModal}
                        onRequestClose={this.toggleModal}
Severity: Major
Found in packages/native/src/components/list/MultiDropdownList.js and 4 other locations - About 1 hr to fix
packages/native/src/components/date/DatePicker.js on lines 207..298
packages/native/src/components/date/DateRange.js on lines 368..459
packages/native/src/components/range/MultiDropdownRange.js on lines 181..252
packages/native/src/components/search/DataSearch.js on lines 337..441

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                    <Modal
                        supportedOrientations={this.props.supportedOrientations || null}
                        transparent={false}
                        visible={this.state.showModal}
                        onRequestClose={this.toggleModal}
Severity: Major
Found in packages/native/src/components/range/MultiDropdownRange.js and 4 other locations - About 1 hr to fix
packages/native/src/components/date/DatePicker.js on lines 207..298
packages/native/src/components/date/DateRange.js on lines 368..459
packages/native/src/components/list/MultiDropdownList.js on lines 263..325
packages/native/src/components/search/DataSearch.js on lines 337..441

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                <Modal
                    supportedOrientations={this.props.supportedOrientations || null}
                    transparent={false}
                    visible={this.state.showModal}
                    onRequestClose={this.toggleModal}
Severity: Major
Found in packages/native/src/components/search/DataSearch.js and 4 other locations - About 1 hr to fix
packages/native/src/components/date/DatePicker.js on lines 207..298
packages/native/src/components/date/DateRange.js on lines 368..459
packages/native/src/components/list/MultiDropdownList.js on lines 263..325
packages/native/src/components/range/MultiDropdownRange.js on lines 181..252

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                <Modal
                    supportedOrientations={this.props.supportedOrientations || null}
                    transparent={false}
                    visible={this.state.showModal}
                    onRequestClose={this.toggleModal}
Severity: Major
Found in packages/native/src/components/date/DatePicker.js and 4 other locations - About 1 hr to fix
packages/native/src/components/date/DateRange.js on lines 368..459
packages/native/src/components/list/MultiDropdownList.js on lines 263..325
packages/native/src/components/range/MultiDropdownRange.js on lines 181..252
packages/native/src/components/search/DataSearch.js on lines 337..441

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export default {
    ...baseConfig,
    banner1: {
        backgroundColor: primaryDark,
    },
Severity: Major
Found in site/src/constants/config/tools/web.js and 2 other locations - About 1 hr to fix
site/src/constants/config/tools/native.js on lines 6..26
site/src/constants/config/tools/vue.js on lines 6..26

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export default {
    ...baseConfig,
    banner1: {
        backgroundColor: primaryDark,
    },
Severity: Major
Found in site/src/constants/config/tools/vue.js and 2 other locations - About 1 hr to fix
site/src/constants/config/tools/native.js on lines 6..26
site/src/constants/config/tools/web.js on lines 6..26

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

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