appbaseio/reactivesearch

View on GitHub

Showing 1,376 of 1,376 total issues

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

        <Flex alignCenter justifyContent="center" className={resultCardHeader}>
            <Avatar src={data.avatar} alt="User avatar" />
            <Link href={data.url} target="_blank" rel="noopener noreferrer">
                <Flex flexWrap>
                    <FlexChild>{data.owner}/</FlexChild>
Severity: Major
Found in site/demos/gitxplore-dark/src/components/Results.js and 1 other location - About 5 hrs to fix
site/demos/gitxplore/src/components/Results.js on lines 21..29

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

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

        <Flex alignCenter justifyContent="center" className={resultCardHeader}>
            <Avatar src={data.avatar} alt="User avatar" />
            <Link href={data.url} target="_blank" rel="noopener noreferrer">
                <Flex flexWrap>
                    <FlexChild>{data.owner}/</FlexChild>
Severity: Major
Found in site/demos/gitxplore/src/components/Results.js and 1 other location - About 5 hrs to fix
site/demos/gitxplore-dark/src/components/Results.js on lines 21..29

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

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 MultiDropdownList.js has 384 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { Component } from 'react';
import { View, Modal, FlatList, TouchableWithoutFeedback } from 'react-native';
import { Text, Body, Item, Header, Left, Button, Icon, Title, Right } from 'native-base';

import {
Severity: Minor
Found in packages/native/src/components/list/MultiDropdownList.js - About 5 hrs to fix

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

        onData(res) {
            return {
                image: res.image,
                title: res.name,
                description: (
    Severity: Major
    Found in packages/web/examples/DateRange/src/index.js and 1 other location - About 5 hrs to fix
    packages/web/examples/DatePicker/src/index.js on lines 62..77

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

    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

        onData(res) {
            return {
                image: res.image,
                title: res.name,
                description: (
    Severity: Major
    Found in packages/web/examples/DatePicker/src/index.js and 1 other location - About 5 hrs to fix
    packages/web/examples/DateRange/src/index.js on lines 33..48

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

    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

        parseLocation(location) {
            if (Array.isArray(location)) {
                return {
                    lat: Number(location[0]),
                    lng: Number(location[1]),
    Severity: Major
    Found in packages/maps/src/components/result/ReactiveMap.js and 1 other location - About 5 hrs to fix
    packages/maps-native/src/components/maps/ReactiveMap.js on lines 343..356

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

    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

    export const FlexChild = styled.div`
        ${props => props.flex && css`
            flex: ${props.flex};
        `};
        ${props => props.marginLeft && css`
    Severity: Major
    Found in site/demos/ecommerce/src/styles/Flex.js and 1 other location - About 5 hrs to fix
    site/demos/producthunt/src/styles/Flex.js on lines 19..40

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

    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

        parseLocation(location) {
            if (Array.isArray(location)) {
                return {
                    lat: Number(location[0]),
                    lng: Number(location[1]),
    Severity: Major
    Found in packages/maps-native/src/components/maps/ReactiveMap.js and 1 other location - About 5 hrs to fix
    packages/maps/src/components/result/ReactiveMap.js on lines 559..572

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

    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

            <Flex>
                <FlexChild><Button><i className="fas fa-star" />{data.stars}</Button></FlexChild>
                <FlexChild><Button><i className="fas fa-code-branch" />{data.forks}</Button></FlexChild>
                <FlexChild><Button><i className="fas fa-eye" />{data.watchers}</Button></FlexChild>
            </Flex>
    Severity: Major
    Found in site/demos/gitxplore-dark/src/components/Results.js and 1 other location - About 5 hrs to fix
    site/demos/gitxplore/src/components/Results.js on lines 46..50

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

    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

    export const FlexChild = styled.div`
        ${props =>
            props.flex
            && css`
                flex: ${props.flex};
    Severity: Major
    Found in site/demos/producthunt/src/styles/Flex.js and 1 other location - About 5 hrs to fix
    site/demos/ecommerce/src/styles/Flex.js on lines 19..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 138.

    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

            <Flex>
                <FlexChild><Button><i className="fas fa-star" />{data.stars}</Button></FlexChild>
                <FlexChild><Button><i className="fas fa-code-branch" />{data.forks}</Button></FlexChild>
                <FlexChild><Button><i className="fas fa-eye" />{data.watchers}</Button></FlexChild>
            </Flex>
    Severity: Major
    Found in site/demos/gitxplore/src/components/Results.js and 1 other location - About 5 hrs to fix
    site/demos/gitxplore-dark/src/components/Results.js on lines 46..50

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

    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 RangeSlider.js has 381 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React, { Component } from 'react';
    import {
        addComponent,
        removeComponent,
        watchComponent,
    Severity: Minor
    Found in packages/web/src/components/range/RangeSlider.js - About 5 hrs to fix

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

          render() {
              const { config, theme } = this.props;
              const isVue = config.name === 'vue';
              return (
                  <ThemeProvider
      Severity: Major
      Found in site/src/components/Learn.js - About 5 hrs to fix

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

                checkPropChange(this.props.options, nextProps.options, () => {
                    const { options } = nextProps;
                    if (Array.isArray(options)) {
                        options.sort((a, b) => {
                            if (a.key < b.key) return -1;
        Severity: Major
        Found in packages/native/src/components/range/RangeSlider.js and 1 other location - About 5 hrs to fix
        packages/web/src/components/range/RangeSlider.js on lines 66..78

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

        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

                checkPropChange(this.props.options, nextProps.options, () => {
                    const { options } = nextProps;
                    if (Array.isArray(options)) {
                        options.sort((a, b) => {
                            if (a.key < b.key) return -1;
        Severity: Major
        Found in packages/web/src/components/range/RangeSlider.js and 1 other location - About 5 hrs to fix
        packages/native/src/components/range/RangeSlider.js on lines 61..73

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

        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

            static defaultQuery = (value, props) => {
                let query = null;
                if (Array.isArray(value) && value.length) {
                    query = {
                        range: {
        Severity: Major
        Found in packages/web/src/components/range/RangeSlider.js and 1 other location - About 5 hrs to fix
        packages/web/src/components/range/DynamicRangeSlider.js on lines 172..197

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

        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

            static defaultQuery = (value, props) => {
                let query = null;
                if (Array.isArray(value) && value.length) {
                    query = {
                        range: {
        Severity: Major
        Found in packages/web/src/components/range/DynamicRangeSlider.js and 1 other location - About 5 hrs to fix
        packages/web/src/components/range/RangeSlider.js on lines 130..155

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

        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

                <Testimonial.Card row={3}>
                    <Testimonial.Author>
                        <img src="https://appbase.io/static/images/customers/charliewood.jpg" alt="Heitor Correa" />
                        <div>
                            <h3>Charlie Wood</h3>
        Severity: Major
        Found in site/src/components/Testimonials.js and 1 other location - About 5 hrs to fix
        site/src/components/Testimonials.js on lines 88..107

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

        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

                <Testimonial.Card row={2}>
                    <Testimonial.Author>
                        <img
                            src="https://appbase.io/static/images/customers/patrickhogan.jpg"
                            alt="Heitor Correa"
        Severity: Major
        Found in site/src/components/Testimonials.js and 1 other location - About 5 hrs to fix
        site/src/components/Testimonials.js on lines 37..53

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

        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 SingleDataList.js has 376 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import React, { Component } from 'react';
        
        import {
            addComponent,
            removeComponent,
        Severity: Minor
        Found in packages/web/src/components/list/SingleDataList.js - About 5 hrs to fix
          Severity
          Category
          Status
          Source
          Language