appbaseio/reactivesearch

View on GitHub

Showing 1,042 of 1,376 total issues

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

const dateQuery = (value) => {
    let query = null;
    if (value) {
        query = [
            {
Severity: Major
Found in packages/web/examples/ssr/pages/daterange.js and 1 other location - About 3 hrs to fix
packages/web/examples/DateRange/src/index.js on lines 10..31

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

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

    updateQuery = (value, props) => {
        const query = props.customQuery || SingleDropdownList.defaultQuery;

        props.updateQuery({
            componentId: props.componentId,
Severity: Major
Found in packages/web/src/components/list/SingleDropdownList.js and 10 other locations - About 3 hrs to fix
packages/web/src/components/basic/TagCloud.js on lines 202..214
packages/web/src/components/date/DatePicker.js on lines 152..164
packages/web/src/components/list/MultiDropdownList.js on lines 284..296
packages/web/src/components/list/MultiList.js on lines 292..304
packages/web/src/components/list/SingleList.js on lines 199..211
packages/web/src/components/range/MultiDropdownRange.js on lines 170..182
packages/web/src/components/range/MultiRange.js on lines 173..185
packages/web/src/components/range/RatingsFilter.js on lines 138..150
packages/web/src/components/range/SingleDropdownRange.js on lines 131..143
packages/web/src/components/range/SingleRange.js on lines 127..139

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

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

    updateQuery = (value, props) => {
        const query = props.customQuery || SingleDropdownRange.defaultQuery;

        props.updateQuery({
            componentId: props.componentId,
Severity: Major
Found in packages/web/src/components/range/SingleDropdownRange.js and 10 other locations - About 3 hrs to fix
packages/web/src/components/basic/TagCloud.js on lines 202..214
packages/web/src/components/date/DatePicker.js on lines 152..164
packages/web/src/components/list/MultiDropdownList.js on lines 284..296
packages/web/src/components/list/MultiList.js on lines 292..304
packages/web/src/components/list/SingleDropdownList.js on lines 189..201
packages/web/src/components/list/SingleList.js on lines 199..211
packages/web/src/components/range/MultiDropdownRange.js on lines 170..182
packages/web/src/components/range/MultiRange.js on lines 173..185
packages/web/src/components/range/RatingsFilter.js on lines 138..150
packages/web/src/components/range/SingleRange.js on lines 127..139

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

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

    updateQuery = (value, props) => {
        const query = props.customQuery || RatingsFilter.defaultQuery;

        props.updateQuery({
            componentId: props.componentId,
Severity: Major
Found in packages/web/src/components/range/RatingsFilter.js and 10 other locations - About 3 hrs to fix
packages/web/src/components/basic/TagCloud.js on lines 202..214
packages/web/src/components/date/DatePicker.js on lines 152..164
packages/web/src/components/list/MultiDropdownList.js on lines 284..296
packages/web/src/components/list/MultiList.js on lines 292..304
packages/web/src/components/list/SingleDropdownList.js on lines 189..201
packages/web/src/components/list/SingleList.js on lines 199..211
packages/web/src/components/range/MultiDropdownRange.js on lines 170..182
packages/web/src/components/range/MultiRange.js on lines 173..185
packages/web/src/components/range/SingleDropdownRange.js on lines 131..143
packages/web/src/components/range/SingleRange.js on lines 127..139

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

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

    updateQuery = (value, props) => {
        const query = props.customQuery || DatePicker.defaultQuery;

        props.updateQuery({
            componentId: props.componentId,
Severity: Major
Found in packages/web/src/components/date/DatePicker.js and 10 other locations - About 3 hrs to fix
packages/web/src/components/basic/TagCloud.js on lines 202..214
packages/web/src/components/list/MultiDropdownList.js on lines 284..296
packages/web/src/components/list/MultiList.js on lines 292..304
packages/web/src/components/list/SingleDropdownList.js on lines 189..201
packages/web/src/components/list/SingleList.js on lines 199..211
packages/web/src/components/range/MultiDropdownRange.js on lines 170..182
packages/web/src/components/range/MultiRange.js on lines 173..185
packages/web/src/components/range/RatingsFilter.js on lines 138..150
packages/web/src/components/range/SingleDropdownRange.js on lines 131..143
packages/web/src/components/range/SingleRange.js on lines 127..139

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

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

                    <div className="col">
                        <SingleDropdownRange
                            componentId="BookSensor"
                            dataField="average_rating"
                            title="SingleDropdownRange"
Severity: Major
Found in packages/web/examples/ResultList/src/index.js and 2 other locations - About 3 hrs to fix
packages/web/examples/MultiRange/src/index.js on lines 16..27
packages/web/examples/ResultCard/src/index.js on lines 16..27

Duplicated Code

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

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

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

Tuning

This issue has a mass of 99.

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

                    <div className="col">
                        <MultiRange
                            title="MultiRange"
                            componentId="BookSensor"
                            dataField="average_rating"
Severity: Major
Found in packages/web/examples/MultiRange/src/index.js and 2 other locations - About 3 hrs to fix
packages/web/examples/ResultCard/src/index.js on lines 16..27
packages/web/examples/ResultList/src/index.js on lines 16..27

Duplicated Code

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

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

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

Tuning

This issue has a mass of 99.

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

                    <div className="col">
                        <SingleDropdownRange
                            componentId="BookSensor"
                            dataField="average_rating"
                            title="SingleDropdownRange"
Severity: Major
Found in packages/web/examples/ResultCard/src/index.js and 2 other locations - About 3 hrs to fix
packages/web/examples/MultiRange/src/index.js on lines 16..27
packages/web/examples/ResultList/src/index.js on lines 16..27

Duplicated Code

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

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

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

Tuning

This issue has a mass of 99.

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

        if (
            !nextProps.pagination
            && this.props.hits
            && nextProps.hits
            && (this.props.hits.length < nextProps.hits.length
Severity: Major
Found in packages/maps/src/components/result/ReactiveMap.js and 2 other locations - About 3 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 167..177
packages/native/src/components/result/ReactiveList.js on lines 190..200

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

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

    getBlacklistRE() {
        return blacklist([
            new RegExp(`^${escape(path.resolve(__dirname, '..', 'node_modules'))}\\/.*$`),
            new RegExp(`^${escape(path.resolve(__dirname, '../..'))}\\/((?!native).)*\\/node_modules\\/.*$`),
            new RegExp(`^${escape(path.resolve(__dirname, '../../maps-native'))}\\/.*\\/node_modules\\/.*$`),
Severity: Major
Found in packages/native/example/rn-cli.config.js and 1 other location - About 3 hrs to fix
packages/maps-native/example/rn-cli.config.js on lines 30..36

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

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

    getBlacklistRE() {
        return blacklist([
            new RegExp(`^${escape(path.resolve(__dirname, '..', 'node_modules'))}\\/.*$`),
            new RegExp(`^${escape(path.resolve(__dirname, '../..'))}\\/((?!maps-native).)*\\/node_modules\\/.*$`),
            new RegExp(`^${escape(path.resolve(__dirname, '../../native/'))}\\/.*\\/node_modules\\/.*$`),
Severity: Major
Found in packages/maps-native/example/rn-cli.config.js and 1 other location - About 3 hrs to fix
packages/native/example/rn-cli.config.js on lines 32..38

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

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

        if (
            !nextProps.pagination
            && this.props.hits
            && nextProps.hits
            && (this.props.hits.length < nextProps.hits.length
Severity: Major
Found in packages/native/src/components/result/ReactiveList.js and 2 other locations - About 3 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 167..177
packages/maps/src/components/result/ReactiveMap.js on lines 260..270

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

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

        if (
            !nextProps.pagination
            && this.props.hits
            && nextProps.hits
            && (this.props.hits.length < nextProps.hits.length
Severity: Major
Found in packages/maps-native/src/components/maps/ReactiveMap.js and 2 other locations - About 3 hrs to fix
packages/maps/src/components/result/ReactiveMap.js on lines 260..270
packages/native/src/components/result/ReactiveList.js on lines 190..200

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

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

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

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

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

Refactorings

Further Reading

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

        if (Array.isArray(nextProps.suggestions) && this.state.currentValue.trim().length) {
            // shallow check allows us to set suggestions even if the next set
            // of suggestions are same as the current one
            if (this.props.suggestions !== nextProps.suggestions) {
                this.setState({
Severity: Major
Found in packages/web/src/components/search/DataSearch.js and 2 other locations - About 3 hrs to fix
packages/native/src/components/search/DataSearch.js on lines 77..85
packages/web/src/components/search/CategorySearch.js on lines 96..104

Duplicated Code

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

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

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

Tuning

This issue has a mass of 97.

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

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

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

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

Refactorings

Further Reading

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

        if (Array.isArray(nextProps.suggestions) && this.state.currentValue.trim().length) {
            // shallow check allows us to set suggestions even if the next set
            // of suggestions are same as the current one
            if (this.props.suggestions !== nextProps.suggestions) {
                this.setState({
Severity: Major
Found in packages/web/src/components/search/CategorySearch.js and 2 other locations - About 3 hrs to fix
packages/native/src/components/search/DataSearch.js on lines 77..85
packages/web/src/components/search/DataSearch.js on lines 83..91

Duplicated Code

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

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

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

Tuning

This issue has a mass of 97.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 97.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 97.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 97.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 97.

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

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

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

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

Refactorings

Further Reading

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

        if (Array.isArray(nextProps.suggestions) && this.state.currentValue.trim().length) {
            // shallow check allows us to set suggestions even if the next set
            // of suggestions are same as the current one
            if (this.props.suggestions !== nextProps.suggestions) {
                this.setState({
Severity: Major
Found in packages/native/src/components/search/DataSearch.js and 2 other locations - About 3 hrs to fix
packages/web/src/components/search/CategorySearch.js on lines 96..104
packages/web/src/components/search/DataSearch.js on lines 83..91

Duplicated Code

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

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

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

Tuning

This issue has a mass of 97.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language