appbaseio/reactivesearch

View on GitHub

Showing 1,042 of 1,376 total issues

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

                <Flex
                    labelPosition={this.$props.sortOptions ? 'right' : 'left'}
                    class={getClassName(this.$props.innerClass, 'resultsInfo')}
                >
                    {this.$props.sortOptions ? this.renderSortOptions() : null}
Severity: Major
Found in packages/vue/src/components/result/ReactiveList.jsx and 1 other location - About 3 hrs to fix
packages/web/src/components/result/ReactiveList.js on lines 537..543

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

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
                    labelPosition={this.props.sortOptions ? 'right' : 'left'}
                    className={getClassName(this.props.innerClass, 'resultsInfo')}
                >
                    {this.props.sortOptions ? this.renderSortOptions() : null}
Severity: Major
Found in packages/web/src/components/result/ReactiveList.js and 1 other location - About 3 hrs to fix
packages/vue/src/components/result/ReactiveList.jsx on lines 306..312

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

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

                            {typeof result.title === 'string' ? (
                                <Title
                                    {...{ domProps: { innerHTML: result.title } }}
                                    className={getClassName(this.$props.innerClass, 'title')}
                                />
Severity: Major
Found in packages/vue/src/components/result/ResultList.jsx and 1 other location - About 3 hrs to fix
packages/vue/src/components/result/ResultCard.jsx on lines 79..88

Duplicated Code

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

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

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

Tuning

This issue has a mass of 103.

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

                        {typeof result.title === 'string' ? (
                            <Title
                                {...{ domProps: { innerHTML: result.title } }}
                                className={getClassName(this.$props.innerClass, 'title')}
                            />
Severity: Major
Found in packages/vue/src/components/result/ResultCard.jsx and 1 other location - About 3 hrs to fix
packages/vue/src/components/result/ResultList.jsx on lines 85..94

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

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

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

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

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

Refactorings

Further Reading

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

        if (config.analytics && url.endsWith('scalr.api.appbase.io') && searchId) {
            fetch(`${url}/${app}/analytics`, {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
Severity: Major
Found in packages/web/src/components/result/ReactiveList.js and 1 other location - About 3 hrs to fix
packages/vue/src/components/result/ReactiveList.jsx on lines 538..549

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

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

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

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

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

Refactorings

Further Reading

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

            if (config.analytics && url.endsWith('scalr.api.appbase.io') && searchId) {
                fetch(`${url}/${app}/analytics`, {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json',
Severity: Major
Found in packages/vue/src/components/result/ReactiveList.jsx and 1 other location - About 3 hrs to fix
packages/web/src/components/result/ReactiveList.js on lines 494..505

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

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

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

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

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

Refactorings

Further Reading

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

class Topic extends Component {
    handleClick = () => {
        this.props.toggleTopic(this.props.children);
    }
    render() {
Severity: Major
Found in site/demos/gitxplore/src/components/Topic.js and 1 other location - About 3 hrs to fix
site/demos/gitxplore-dark/src/components/Topic.js on lines 6..17

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

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

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

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

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

Refactorings

Further Reading

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

class Topic extends Component {
    handleClick = () => {
        this.props.toggleTopic(this.props.children);
    }
    render() {
Severity: Major
Found in site/demos/gitxplore-dark/src/components/Topic.js and 1 other location - About 3 hrs to fix
site/demos/gitxplore/src/components/Topic.js on lines 6..17

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

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 Card = styled('a')`
    width: auto;
    flex-grow: 1;
    outline: none;
    text-decoration: none;
Severity: Major
Found in packages/web/src/styles/Card.js and 1 other location - About 3 hrs to fix
packages/vue/src/styles/Card.js on lines 30..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 101.

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 Card = styled('a')`
    width: auto;
    flex-grow: 1;
    outline: none;
    text-decoration: none;
Severity: Major
Found in packages/vue/src/styles/Card.js and 1 other location - About 3 hrs to fix
packages/web/src/styles/Card.js on lines 30..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 101.

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

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

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

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

Refactorings

Further Reading

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

    constructor(props) {
        super(props);

        this.state = {
            currentValue: '',
Severity: Major
Found in packages/web/src/components/search/DataSearch.js and 1 other location - About 3 hrs to fix
packages/web/src/components/search/CategorySearch.js on lines 45..56

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

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

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

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

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

Refactorings

Further Reading

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

    constructor(props) {
        super(props);

        this.state = {
            currentValue: '',
Severity: Major
Found in packages/web/src/components/search/CategorySearch.js and 1 other location - About 3 hrs to fix
packages/web/src/components/search/DataSearch.js on lines 34..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 100.

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 || MultiDropdownList.defaultQuery;

        props.updateQuery({
            componentId: props.componentId,
Severity: Major
Found in packages/web/src/components/list/MultiDropdownList.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/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 11 locations. Consider refactoring.
Open

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

        props.updateQuery({
            componentId: props.componentId,
Severity: Major
Found in packages/web/src/components/range/MultiDropdownRange.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/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

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

    dateQuery(value) {
        let query = null;
        if (value) {
            query = [
                {
Severity: Major
Found in packages/web/examples/DateRange/src/index.js and 1 other location - About 3 hrs to fix
packages/web/examples/ssr/pages/daterange.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 || SingleList.defaultQuery;

        props.updateQuery({
            componentId: props.componentId,
Severity: Major
Found in packages/web/src/components/list/SingleList.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/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 || MultiRange.defaultQuery;

        props.updateQuery({
            componentId: props.componentId,
Severity: Major
Found in packages/web/src/components/range/MultiRange.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/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 || TagCloud.defaultQuery;

        props.updateQuery({
            componentId: props.componentId,
Severity: Major
Found in packages/web/src/components/basic/TagCloud.js and 10 other locations - About 3 hrs to fix
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/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 || MultiList.defaultQuery;

        props.updateQuery({
            componentId: props.componentId,
Severity: Major
Found in packages/web/src/components/list/MultiList.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/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 11 locations. Consider refactoring.
Open

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

        props.updateQuery({
            componentId: props.componentId,
Severity: Major
Found in packages/web/src/components/range/SingleRange.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/SingleDropdownRange.js on lines 131..143

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

Severity
Category
Status
Source
Language