appbaseio/reactivesearch

View on GitHub

Showing 1,376 of 1,376 total issues

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 93.

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

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

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

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

Refactorings

Further Reading

Function render has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    render() {
        const { selectedValues } = this.props;
        let hasValues = false;

        return (
Severity: Major
Found in packages/native/src/components/basic/SelectedFilters.js - About 2 hrs to fix

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

            setReact(props) {
                const { react } = props;
    
                if (react) {
                    const newReact = pushToAndClause(react, this.internalComponent);
    Severity: Major
    Found in packages/vue/src/components/list/MultiDropdownList.jsx and 4 other locations - About 2 hrs to fix
    packages/vue/src/components/list/MultiList.jsx on lines 247..258
    packages/vue/src/components/list/SingleDropdownList.jsx on lines 203..214
    packages/vue/src/components/list/SingleList.jsx on lines 239..250
    packages/vue/src/components/result/ReactiveList.jsx on lines 411..422

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

    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

            setReact(props) {
                const { react } = props;
    
                if (react) {
                    const newReact = pushToAndClause(react, this.internalComponent);
    Severity: Major
    Found in packages/vue/src/components/list/MultiList.jsx and 4 other locations - About 2 hrs to fix
    packages/vue/src/components/list/MultiDropdownList.jsx on lines 216..227
    packages/vue/src/components/list/SingleDropdownList.jsx on lines 203..214
    packages/vue/src/components/list/SingleList.jsx on lines 239..250
    packages/vue/src/components/result/ReactiveList.jsx on lines 411..422

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

    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

            setReact(props) {
                const { react } = props;
    
                if (react) {
                    const newReact = pushToAndClause(react, this.internalComponent);
    Severity: Major
    Found in packages/vue/src/components/result/ReactiveList.jsx and 4 other locations - About 2 hrs to fix
    packages/vue/src/components/list/MultiDropdownList.jsx on lines 216..227
    packages/vue/src/components/list/MultiList.jsx on lines 247..258
    packages/vue/src/components/list/SingleDropdownList.jsx on lines 203..214
    packages/vue/src/components/list/SingleList.jsx on lines 239..250

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

    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

            setReact(props) {
                const { react } = props;
    
                if (react) {
                    const newReact = pushToAndClause(react, this.internalComponent);
    Severity: Major
    Found in packages/vue/src/components/list/SingleDropdownList.jsx and 4 other locations - About 2 hrs to fix
    packages/vue/src/components/list/MultiDropdownList.jsx on lines 216..227
    packages/vue/src/components/list/MultiList.jsx on lines 247..258
    packages/vue/src/components/list/SingleList.jsx on lines 239..250
    packages/vue/src/components/result/ReactiveList.jsx on lines 411..422

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

    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 (props.strictSelection) {
                                if (cause === causes.SUGGESTION_SELECT || value === '') {
                                    this.updateQuery(props.componentId, value, props);
                                } else {
                                    this.setValue('', true);
    Severity: Major
    Found in packages/web/src/components/search/DataSearch.js and 1 other location - About 2 hrs to fix
    packages/vue/src/components/search/DataSearch.jsx on lines 235..243

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

    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

            setReact(props) {
                const { react } = props;
    
                if (react) {
                    const newReact = pushToAndClause(react, this.internalComponent);
    Severity: Major
    Found in packages/vue/src/components/list/SingleList.jsx and 4 other locations - About 2 hrs to fix
    packages/vue/src/components/list/MultiDropdownList.jsx on lines 216..227
    packages/vue/src/components/list/MultiList.jsx on lines 247..258
    packages/vue/src/components/list/SingleDropdownList.jsx on lines 203..214
    packages/vue/src/components/result/ReactiveList.jsx on lines 411..422

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

    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 (
                !this.state.currentValue
                && this.props.defaultSuggestions
                && this.props.defaultSuggestions.length
            ) {
    Severity: Major
    Found in packages/native/src/components/search/DataSearch.js and 2 other locations - About 2 hrs to fix
    packages/web/src/components/search/CategorySearch.js on lines 525..533
    packages/web/src/components/search/DataSearch.js on lines 469..477

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

    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 (
                !this.state.currentValue
                && this.props.defaultSuggestions
                && this.props.defaultSuggestions.length
            ) {
    Severity: Major
    Found in packages/web/src/components/search/CategorySearch.js and 2 other locations - About 2 hrs to fix
    packages/native/src/components/search/DataSearch.js on lines 302..310
    packages/web/src/components/search/DataSearch.js on lines 469..477

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

    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 (
                !this.state.currentValue
                && this.props.defaultSuggestions
                && this.props.defaultSuggestions.length
            ) {
    Severity: Major
    Found in packages/web/src/components/search/DataSearch.js and 2 other locations - About 2 hrs to fix
    packages/native/src/components/search/DataSearch.js on lines 302..310
    packages/web/src/components/search/CategorySearch.js on lines 525..533

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

    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 (props.strictSelection) {
                            if (cause === causes.SUGGESTION_SELECT || value === '') {
                                this.updateQueryHandler(props.componentId, value, props);
                            } else {
                                this.setValue('', true);
    Severity: Major
    Found in packages/vue/src/components/search/DataSearch.jsx and 1 other location - About 2 hrs to fix
    packages/web/src/components/search/DataSearch.js on lines 281..289

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

    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

                            <Button
                                className={getClassName(this.props.innerClass, 'button') || null}
                                onClick={this.incrementValue}
                                disabled={this.state.currentValue === this.props.data.end}
                            >
    Severity: Major
    Found in packages/web/src/components/basic/NumberBox.js and 1 other location - About 2 hrs to fix
    packages/web/src/components/basic/NumberBox.js on lines 184..190

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

    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

                            <Button
                                className={getClassName(this.props.innerClass, 'button') || null}
                                onClick={this.decrementValue}
                                disabled={this.state.currentValue === this.props.data.start}
                            >
    Severity: Major
    Found in packages/web/src/components/basic/NumberBox.js and 1 other location - About 2 hrs to fix
    packages/web/src/components/basic/NumberBox.js on lines 192..198

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

    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

        updateQuery = (value, props) => {
            const query = props.customQuery || this.defaultQuery;
    
            props.updateQuery({
                componentId: props.componentId,
    Severity: Major
    Found in packages/native/src/components/basic/TextField.js and 4 other locations - About 2 hrs to fix
    packages/native/src/components/list/MultiDropdownList.js on lines 211..222
    packages/native/src/components/list/SingleDropdownList.js on lines 130..141
    packages/native/src/components/range/MultiDropdownRange.js on lines 163..174
    packages/native/src/components/range/SingleDropdownRange.js on lines 105..116

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

    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

        updateQuery = (value, props) => {
            const query = props.customQuery || this.defaultQuery;
    
            props.updateQuery({
                componentId: props.componentId,
    Severity: Major
    Found in packages/native/src/components/list/MultiDropdownList.js and 4 other locations - About 2 hrs to fix
    packages/native/src/components/basic/TextField.js on lines 99..110
    packages/native/src/components/list/SingleDropdownList.js on lines 130..141
    packages/native/src/components/range/MultiDropdownRange.js on lines 163..174
    packages/native/src/components/range/SingleDropdownRange.js on lines 105..116

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

    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

        updateQuery = (value, props) => {
            const query = props.customQuery || this.defaultQuery;
    
            props.updateQuery({
                componentId: props.componentId,
    Severity: Major
    Found in packages/native/src/components/range/SingleDropdownRange.js and 4 other locations - About 2 hrs to fix
    packages/native/src/components/basic/TextField.js on lines 99..110
    packages/native/src/components/list/MultiDropdownList.js on lines 211..222
    packages/native/src/components/list/SingleDropdownList.js on lines 130..141
    packages/native/src/components/range/MultiDropdownRange.js on lines 163..174

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

    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

        toggleTopic = (topic) => {
            const { currentTopics } = this.state;
            const nextState = currentTopics.includes(topic)
                ? currentTopics.filter(item => item !== topic)
                : currentTopics.concat(topic);
    Severity: Major
    Found in site/demos/gitxplore-dark/src/App.js and 1 other location - About 2 hrs to fix
    site/demos/gitxplore/src/App.js on lines 26..34

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

    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

        updateQuery = (value, props) => {
            const query = props.customQuery || this.defaultQuery;
    
            props.updateQuery({
                componentId: props.componentId,
    Severity: Major
    Found in packages/native/src/components/range/MultiDropdownRange.js and 4 other locations - About 2 hrs to fix
    packages/native/src/components/basic/TextField.js on lines 99..110
    packages/native/src/components/list/MultiDropdownList.js on lines 211..222
    packages/native/src/components/list/SingleDropdownList.js on lines 130..141
    packages/native/src/components/range/SingleDropdownRange.js on lines 105..116

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

    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

        updateQuery = (value, props) => {
            const query = props.customQuery || this.defaultQuery;
    
            props.updateQuery({
                componentId: props.componentId,
    Severity: Major
    Found in packages/native/src/components/list/SingleDropdownList.js and 4 other locations - About 2 hrs to fix
    packages/native/src/components/basic/TextField.js on lines 99..110
    packages/native/src/components/list/MultiDropdownList.js on lines 211..222
    packages/native/src/components/range/MultiDropdownRange.js on lines 163..174
    packages/native/src/components/range/SingleDropdownRange.js on lines 105..116

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

    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