appbaseio/reactivesearch

View on GitHub

Showing 1,376 of 1,376 total issues

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

const mapDispatchtoProps = dispatch => ({
    addComponent: component => dispatch(addComponent(component)),
    removeComponent: component => dispatch(removeComponent(component)),
    updateQuery: updateQueryObject => dispatch(updateQuery(updateQueryObject)),
    watchComponent: (component, react) => dispatch(watchComponent(component, react)),
Severity: Major
Found in packages/web/src/components/range/MultiDropdownRange.js and 11 other locations - About 3 hrs to fix
packages/maps/src/components/basic/GeoDistanceDropdown.js on lines 532..539
packages/maps/src/components/basic/GeoDistanceSlider.js on lines 571..578
packages/web/src/components/basic/NumberBox.js on lines 244..251
packages/web/src/components/basic/TextField.js on lines 260..267
packages/web/src/components/basic/ToggleButton.js on lines 259..266
packages/web/src/components/date/DatePicker.js on lines 264..271
packages/web/src/components/date/DateRange.js on lines 462..469
packages/web/src/components/range/MultiRange.js on lines 272..279
packages/web/src/components/range/RatingsFilter.js on lines 225..232
packages/web/src/components/range/SingleDropdownRange.js on lines 213..220
packages/web/src/components/range/SingleRange.js on lines 227..234

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

const mapDispatchtoProps = dispatch => ({
    addComponent: component => dispatch(addComponent(component)),
    removeComponent: component => dispatch(removeComponent(component)),
    watchComponent: (component, react) => dispatch(watchComponent(component, react)),
    updateQuery: updateQueryObject => dispatch(updateQuery(updateQueryObject)),
Severity: Major
Found in packages/native/src/components/basic/TextField.js and 4 other locations - About 3 hrs to fix
packages/native/src/components/date/DatePicker.js on lines 336..343
packages/native/src/components/date/DateRange.js on lines 501..508
packages/native/src/components/range/MultiDropdownRange.js on lines 329..336
packages/native/src/components/range/SingleDropdownRange.js on lines 191..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 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 5 locations. Consider refactoring.
Open

const mapDispatchtoProps = dispatch => ({
    addComponent: component => dispatch(addComponent(component)),
    removeComponent: component => dispatch(removeComponent(component)),
    watchComponent: (component, react) => dispatch(watchComponent(component, react)),
    updateQuery: updateQueryObject => dispatch(updateQuery(updateQueryObject)),
Severity: Major
Found in packages/native/src/components/date/DatePicker.js and 4 other locations - About 3 hrs to fix
packages/native/src/components/basic/TextField.js on lines 246..253
packages/native/src/components/date/DateRange.js on lines 501..508
packages/native/src/components/range/MultiDropdownRange.js on lines 329..336
packages/native/src/components/range/SingleDropdownRange.js on lines 191..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 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 12 locations. Consider refactoring.
Open

const mapDispatchtoProps = dispatch => ({
    addComponent: component => dispatch(addComponent(component)),
    removeComponent: component => dispatch(removeComponent(component)),
    updateQuery: updateQueryObject => dispatch(updateQuery(updateQueryObject)),
    watchComponent: (component, react) => dispatch(watchComponent(component, react)),
Severity: Major
Found in packages/web/src/components/range/SingleDropdownRange.js and 11 other locations - About 3 hrs to fix
packages/maps/src/components/basic/GeoDistanceDropdown.js on lines 532..539
packages/maps/src/components/basic/GeoDistanceSlider.js on lines 571..578
packages/web/src/components/basic/NumberBox.js on lines 244..251
packages/web/src/components/basic/TextField.js on lines 260..267
packages/web/src/components/basic/ToggleButton.js on lines 259..266
packages/web/src/components/date/DatePicker.js on lines 264..271
packages/web/src/components/date/DateRange.js on lines 462..469
packages/web/src/components/range/MultiDropdownRange.js on lines 252..259
packages/web/src/components/range/MultiRange.js on lines 272..279
packages/web/src/components/range/RatingsFilter.js on lines 225..232
packages/web/src/components/range/SingleRange.js on lines 227..234

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

const mapDispatchtoProps = dispatch => ({
    addComponent: component => dispatch(addComponent(component)),
    removeComponent: component => dispatch(removeComponent(component)),
    updateQuery: updateQueryObject => dispatch(updateQuery(updateQueryObject)),
    watchComponent: (component, react) => dispatch(watchComponent(component, react)),
Severity: Major
Found in packages/maps/src/components/basic/GeoDistanceDropdown.js and 11 other locations - About 3 hrs to fix
packages/maps/src/components/basic/GeoDistanceSlider.js on lines 571..578
packages/web/src/components/basic/NumberBox.js on lines 244..251
packages/web/src/components/basic/TextField.js on lines 260..267
packages/web/src/components/basic/ToggleButton.js on lines 259..266
packages/web/src/components/date/DatePicker.js on lines 264..271
packages/web/src/components/date/DateRange.js on lines 462..469
packages/web/src/components/range/MultiDropdownRange.js on lines 252..259
packages/web/src/components/range/MultiRange.js on lines 272..279
packages/web/src/components/range/RatingsFilter.js on lines 225..232
packages/web/src/components/range/SingleDropdownRange.js on lines 213..220
packages/web/src/components/range/SingleRange.js on lines 227..234

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

const mapDispatchtoProps = dispatch => ({
    addComponent: component => dispatch(addComponent(component)),
    removeComponent: component => dispatch(removeComponent(component)),
    updateQuery: updateQueryObject => dispatch(updateQuery(updateQueryObject)),
    watchComponent: (component, react) => dispatch(watchComponent(component, react)),
Severity: Major
Found in packages/web/src/components/basic/NumberBox.js and 11 other locations - About 3 hrs to fix
packages/maps/src/components/basic/GeoDistanceDropdown.js on lines 532..539
packages/maps/src/components/basic/GeoDistanceSlider.js on lines 571..578
packages/web/src/components/basic/TextField.js on lines 260..267
packages/web/src/components/basic/ToggleButton.js on lines 259..266
packages/web/src/components/date/DatePicker.js on lines 264..271
packages/web/src/components/date/DateRange.js on lines 462..469
packages/web/src/components/range/MultiDropdownRange.js on lines 252..259
packages/web/src/components/range/MultiRange.js on lines 272..279
packages/web/src/components/range/RatingsFilter.js on lines 225..232
packages/web/src/components/range/SingleDropdownRange.js on lines 213..220
packages/web/src/components/range/SingleRange.js on lines 227..234

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

const mapDispatchtoProps = dispatch => ({
    addComponent: component => dispatch(addComponent(component)),
    removeComponent: component => dispatch(removeComponent(component)),
    updateQuery: updateQueryObject => dispatch(updateQuery(updateQueryObject)),
    watchComponent: (component, react) => dispatch(watchComponent(component, react)),
Severity: Major
Found in packages/web/src/components/date/DatePicker.js and 11 other locations - About 3 hrs to fix
packages/maps/src/components/basic/GeoDistanceDropdown.js on lines 532..539
packages/maps/src/components/basic/GeoDistanceSlider.js on lines 571..578
packages/web/src/components/basic/NumberBox.js on lines 244..251
packages/web/src/components/basic/TextField.js on lines 260..267
packages/web/src/components/basic/ToggleButton.js on lines 259..266
packages/web/src/components/date/DateRange.js on lines 462..469
packages/web/src/components/range/MultiDropdownRange.js on lines 252..259
packages/web/src/components/range/MultiRange.js on lines 272..279
packages/web/src/components/range/RatingsFilter.js on lines 225..232
packages/web/src/components/range/SingleDropdownRange.js on lines 213..220
packages/web/src/components/range/SingleRange.js on lines 227..234

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

const mapDispatchtoProps = dispatch => ({
    addComponent: component => dispatch(addComponent(component)),
    removeComponent: component => dispatch(removeComponent(component)),
    updateQuery: updateQueryObject => dispatch(updateQuery(updateQueryObject)),
    watchComponent: (component, react) => dispatch(watchComponent(component, react)),
Severity: Major
Found in packages/web/src/components/date/DateRange.js and 11 other locations - About 3 hrs to fix
packages/maps/src/components/basic/GeoDistanceDropdown.js on lines 532..539
packages/maps/src/components/basic/GeoDistanceSlider.js on lines 571..578
packages/web/src/components/basic/NumberBox.js on lines 244..251
packages/web/src/components/basic/TextField.js on lines 260..267
packages/web/src/components/basic/ToggleButton.js on lines 259..266
packages/web/src/components/date/DatePicker.js on lines 264..271
packages/web/src/components/range/MultiDropdownRange.js on lines 252..259
packages/web/src/components/range/MultiRange.js on lines 272..279
packages/web/src/components/range/RatingsFilter.js on lines 225..232
packages/web/src/components/range/SingleDropdownRange.js on lines 213..220
packages/web/src/components/range/SingleRange.js on lines 227..234

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

const mapDispatchtoProps = dispatch => ({
    addComponent: component => dispatch(addComponent(component)),
    removeComponent: component => dispatch(removeComponent(component)),
    watchComponent: (component, react) => dispatch(watchComponent(component, react)),
    updateQuery: updateQueryObject => dispatch(updateQuery(updateQueryObject)),
Severity: Major
Found in packages/native/src/components/range/MultiDropdownRange.js and 4 other locations - About 3 hrs to fix
packages/native/src/components/basic/TextField.js on lines 246..253
packages/native/src/components/date/DatePicker.js on lines 336..343
packages/native/src/components/date/DateRange.js on lines 501..508
packages/native/src/components/range/SingleDropdownRange.js on lines 191..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 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 12 locations. Consider refactoring.
Open

const mapDispatchtoProps = dispatch => ({
    addComponent: component => dispatch(addComponent(component)),
    removeComponent: component => dispatch(removeComponent(component)),
    updateQuery: updateQueryObject => dispatch(updateQuery(updateQueryObject)),
    watchComponent: (component, react) => dispatch(watchComponent(component, react)),
Severity: Major
Found in packages/web/src/components/range/RatingsFilter.js and 11 other locations - About 3 hrs to fix
packages/maps/src/components/basic/GeoDistanceDropdown.js on lines 532..539
packages/maps/src/components/basic/GeoDistanceSlider.js on lines 571..578
packages/web/src/components/basic/NumberBox.js on lines 244..251
packages/web/src/components/basic/TextField.js on lines 260..267
packages/web/src/components/basic/ToggleButton.js on lines 259..266
packages/web/src/components/date/DatePicker.js on lines 264..271
packages/web/src/components/date/DateRange.js on lines 462..469
packages/web/src/components/range/MultiDropdownRange.js on lines 252..259
packages/web/src/components/range/MultiRange.js on lines 272..279
packages/web/src/components/range/SingleDropdownRange.js on lines 213..220
packages/web/src/components/range/SingleRange.js on lines 227..234

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'}
                    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

                        {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

File MultiDropdownRange.js has 308 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable */
import React, { Component } from 'react';
import { View, Modal, ListView, TouchableWithoutFeedback } from 'react-native';
import { CheckBox, Text, Body, Item, Header, Left, Button, Icon, Title, Right } from 'native-base';

Severity: Minor
Found in packages/native/src/components/range/MultiDropdownRange.js - About 3 hrs to fix

    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

            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

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

        render() {
            const { config, theme } = this.props;
            const { primary } = theme;
            return (
                <ThemeProvider
    Severity: Major
    Found in site/src/components/Demo.js - About 3 hrs to fix

      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/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

      Severity
      Category
      Status
      Source
      Language