appbaseio/reactivesearch

View on GitHub

Showing 1,376 of 1,376 total issues

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

module.exports = {
    context: path.resolve(__dirname, 'src'),
    entry: {
        main: './index.js',
    },
Severity: Major
Found in site/demos/gitxplore-dark/webpack.config.js and 6 other locations - About 3 hrs to fix
site/demos/airbeds/webpack.config.js on lines 3..22
site/demos/ecommerce/webpack.config.js on lines 3..22
site/demos/gitxplore/webpack.config.js on lines 3..22
site/demos/meetup/webpack.config.js on lines 3..22
site/demos/producthunt/webpack.config.js on lines 3..22
site/demos/technews/webpack.config.js on lines 3..22

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

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

module.exports = {
    context: path.resolve(__dirname, 'src'),
    entry: {
        main: './index.js',
    },
Severity: Major
Found in site/demos/gitxplore/webpack.config.js and 6 other locations - About 3 hrs to fix
site/demos/airbeds/webpack.config.js on lines 3..22
site/demos/ecommerce/webpack.config.js on lines 3..22
site/demos/gitxplore-dark/webpack.config.js on lines 3..22
site/demos/meetup/webpack.config.js on lines 3..22
site/demos/producthunt/webpack.config.js on lines 3..22
site/demos/technews/webpack.config.js on lines 3..22

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

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

module.exports = {
    context: path.resolve(__dirname, 'src'),
    entry: {
        main: './index.js',
    },
Severity: Major
Found in site/demos/producthunt/webpack.config.js and 6 other locations - About 3 hrs to fix
site/demos/airbeds/webpack.config.js on lines 3..22
site/demos/ecommerce/webpack.config.js on lines 3..22
site/demos/gitxplore-dark/webpack.config.js on lines 3..22
site/demos/gitxplore/webpack.config.js on lines 3..22
site/demos/meetup/webpack.config.js on lines 3..22
site/demos/technews/webpack.config.js on lines 3..22

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

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

module.exports = {
    context: path.resolve(__dirname, 'src'),
    entry: {
        main: './index.js',
    },
Severity: Major
Found in site/demos/technews/webpack.config.js and 6 other locations - About 3 hrs to fix
site/demos/airbeds/webpack.config.js on lines 3..22
site/demos/ecommerce/webpack.config.js on lines 3..22
site/demos/gitxplore-dark/webpack.config.js on lines 3..22
site/demos/gitxplore/webpack.config.js on lines 3..22
site/demos/meetup/webpack.config.js on lines 3..22
site/demos/producthunt/webpack.config.js on lines 3..22

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

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

module.exports = {
    context: path.resolve(__dirname, 'src'),
    entry: {
        main: './index.js',
    },
Severity: Major
Found in site/demos/ecommerce/webpack.config.js and 6 other locations - About 3 hrs to fix
site/demos/airbeds/webpack.config.js on lines 3..22
site/demos/gitxplore-dark/webpack.config.js on lines 3..22
site/demos/gitxplore/webpack.config.js on lines 3..22
site/demos/meetup/webpack.config.js on lines 3..22
site/demos/producthunt/webpack.config.js on lines 3..22
site/demos/technews/webpack.config.js on lines 3..22

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

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

module.exports = {
    context: path.resolve(__dirname, 'src'),
    entry: {
        main: './index.js',
    },
Severity: Major
Found in site/demos/airbeds/webpack.config.js and 6 other locations - About 3 hrs to fix
site/demos/ecommerce/webpack.config.js on lines 3..22
site/demos/gitxplore-dark/webpack.config.js on lines 3..22
site/demos/gitxplore/webpack.config.js on lines 3..22
site/demos/meetup/webpack.config.js on lines 3..22
site/demos/producthunt/webpack.config.js on lines 3..22
site/demos/technews/webpack.config.js on lines 3..22

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

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

        <FlexChild margin="10px">
            <RangeSlider
                componentId="stars"
                title="Repo Stars"
                dataField="stars"
Severity: Major
Found in site/demos/gitxplore/src/components/SearchFilters.js and 3 other locations - About 3 hrs to fix
site/demos/gitxplore-dark/src/components/SearchFilters.js on lines 112..127
site/demos/gitxplore-dark/src/components/SearchFilters.js on lines 128..143
site/demos/gitxplore/src/components/SearchFilters.js on lines 134..149

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

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

        <FlexChild margin="10px">
            <RangeSlider
                componentId="stars"
                title="Repo Stars"
                dataField="stars"
Severity: Major
Found in site/demos/gitxplore-dark/src/components/SearchFilters.js and 3 other locations - About 3 hrs to fix
site/demos/gitxplore-dark/src/components/SearchFilters.js on lines 128..143
site/demos/gitxplore/src/components/SearchFilters.js on lines 118..133
site/demos/gitxplore/src/components/SearchFilters.js on lines 134..149

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

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

        <FlexChild margin="10px">
            <RangeSlider
                componentId="forks"
                title="Repo Forks"
                dataField="forks"
Severity: Major
Found in site/demos/gitxplore-dark/src/components/SearchFilters.js and 3 other locations - About 3 hrs to fix
site/demos/gitxplore-dark/src/components/SearchFilters.js on lines 112..127
site/demos/gitxplore/src/components/SearchFilters.js on lines 118..133
site/demos/gitxplore/src/components/SearchFilters.js on lines 134..149

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

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

        <FlexChild margin="10px">
            <RangeSlider
                componentId="forks"
                title="Repo Forks"
                dataField="forks"
Severity: Major
Found in site/demos/gitxplore/src/components/SearchFilters.js and 3 other locations - About 3 hrs to fix
site/demos/gitxplore-dark/src/components/SearchFilters.js on lines 112..127
site/demos/gitxplore-dark/src/components/SearchFilters.js on lines 128..143
site/demos/gitxplore/src/components/SearchFilters.js on lines 118..133

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

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

        updateQueryOptions(props, addAfterKey = false) {
            // when using composite aggs flush the current options for a fresh query
            if (props.showLoadMore && !addAfterKey) {
                this.modifiedOptions = [];
            } // for a new query due to other changes don't append after to get fresh results
Severity: Major
Found in packages/vue/src/components/list/MultiDropdownList.jsx and 1 other location - About 3 hrs to fix
packages/vue/src/components/list/SingleDropdownList.jsx on lines 259..270

Duplicated Code

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

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

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

Tuning

This issue has a mass of 96.

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

        this.mapStyles = [
            { label: 'Standard', value: Standard },
            { label: 'Blue Essence', value: BlueEssence },
            { label: 'Blue Water', value: BlueWater },
            { label: 'Flat Map', value: FlatMap },
Severity: Major
Found in packages/maps-native/src/components/maps/ReactiveMap.js and 1 other location - About 3 hrs to fix
packages/maps/src/components/result/ReactiveMap.js on lines 81..89

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

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

        this.mapStyles = [
            { label: 'Standard', value: Standard },
            { label: 'Blue Essence', value: BlueEssence },
            { label: 'Blue Water', value: BlueWater },
            { label: 'Flat Map', value: FlatMap },
Severity: Major
Found in packages/maps/src/components/result/ReactiveMap.js and 1 other location - About 3 hrs to fix
packages/maps-native/src/components/maps/ReactiveMap.js on lines 47..55

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

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

    render() {
        const { onData, ...props } = this.$props;
        const onResultStats = this.$props.onResultStats || this.$scopedSlots.onResultStats;
        return (
            <RLConnected
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 40..55

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

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

        updateQueryOptions(props, addAfterKey = false) {
            // when using composite aggs flush the current options for a fresh query
            if (props.showLoadMore && !addAfterKey) {
                this.modifiedOptions = [];
            } // for a new query due to other changes don't append after to get fresh results
Severity: Major
Found in packages/vue/src/components/list/SingleDropdownList.jsx and 1 other location - About 3 hrs to fix
packages/vue/src/components/list/MultiDropdownList.jsx on lines 322..333

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

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

    render() {
        const { onData, ...props } = this.$props;
        const onResultStats = this.$props.onResultStats || this.$scopedSlots.onResultStats;
        return (
            <RLConnected
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 40..55

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

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 defaultQuery has 75 lines of code (exceeds 25 allowed). Consider refactoring.
Open

MultiDropdownList.defaultQuery = (value, props) => {
    let query = null;
    const type = props.queryFormat === 'or' ? 'terms' : 'term';

    if (!Array.isArray(value) || value.length === 0) {
Severity: Major
Found in packages/vue/src/components/list/MultiDropdownList.jsx - About 3 hrs to fix

    Consider simplifying this complex logical expression.
    Open

                if (this.state.currentDate.end) {
                    const range = this.getDateRange(
                        new XDate(this.state.currentDate.start.timestamp),
                        new XDate(this.state.currentDate.end.timestamp),
                    );
    Severity: Critical
    Found in packages/native/src/components/date/DateRange.js - About 3 hrs to fix

      DataSearch has 26 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class DataSearch extends Component {
          constructor(props) {
              super(props);
      
              this.state = {
      Severity: Minor
      Found in packages/web/src/components/search/DataSearch.js - About 3 hrs to fix

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

                if (nextProps.pagination && nextProps.total !== this.props.total) {
                    this.setState({
                        totalPages: Math.ceil(nextProps.total / nextProps.size),
                        currentPage: this.props.total ? 0 : this.state.currentPage,
                    });
        Severity: Major
        Found in packages/maps-native/src/components/maps/ReactiveMap.js and 1 other location - About 3 hrs to fix
        packages/maps/src/components/result/ReactiveMap.js on lines 287..292

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

        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