appbaseio/reactivesearch

View on GitHub

Showing 1,376 of 1,376 total issues

Function booksReactiveList has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    booksReactiveList(data) {
        return (
            <div className="flex book-content" key={data._id}>
                <img src={data.image} alt="Book Cover" className="book-image" />
                <div className="flex column justify-center" style={{ marginLeft: 20 }}>
Severity: Minor
Found in packages/web/examples/SingleList/src/index.js - About 1 hr to fix

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

        render() {
            if (this.props.render) {
                return this.props.render(this.props);
            }
    
    
    Severity: Minor
    Found in packages/web/src/components/basic/SelectedFilters.js - About 1 hr to fix

      Function booksReactiveList has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          booksReactiveList(data) {
              return (
                  <div className="flex book-content" key={data._id}>
                      <img src={data.image} alt="Book Cover" className="book-image" />
                      <div className="flex column justify-center" style={{ marginLeft: 20 }}>
      Severity: Minor
      Found in packages/web/examples/SingleDropdownList/src/index.js - About 1 hr to fix

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

            render() {
                return (
                    <ReactiveBase
                        app="good-books-ds"
                        credentials="nY6NNTZZ6:27b76b9f-18ea-456c-bc5e-3a5263ebc63d"
        Severity: Minor
        Found in packages/web/examples/TextField/src/index.js - About 1 hr to fix

          Function componentWillReceiveProps has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              componentWillReceiveProps(nextProps) {
                  checkPropChange(this.props.react, nextProps.react, () => this.setReact(nextProps));
          
                  checkSomePropChange(this.props, nextProps, ['dataField', 'nestedField'], () => {
                      this.updateQuery(Object.keys(this.state.currentValue), nextProps);
          Severity: Minor
          Found in packages/web/src/components/list/MultiDataList.js - About 1 hr to fix

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

                renderInfo() {
                    const { title } = this.state;
                    if (title) {
                        return <div className="title-box">{title}</div>;
                    }
            Severity: Major
            Found in site/demos/polyline/src/index.js and 2 other locations - About 1 hr to fix
            site/demos/datalayer/src/index.js on lines 22..28
            site/demos/polygon/src/index.js on lines 25..31

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 56.

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

                renderInfo() {
                    const { title } = this.state;
                    if (title) {
                        return <div className="title-box">{title}</div>;
                    }
            Severity: Major
            Found in site/demos/polygon/src/index.js and 2 other locations - About 1 hr to fix
            site/demos/datalayer/src/index.js on lines 22..28
            site/demos/polyline/src/index.js on lines 25..31

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 56.

            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

            export const ToggleButton = styled.div`
                ${button};
                color: white;
                border: 1px solid white;
                display: none;
            Severity: Major
            Found in site/demos/gitxplore-dark/src/styles/Button.js and 1 other location - About 1 hr to fix
            site/demos/gitxplore/src/styles/Button.js on lines 14..33

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

            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

            export const ToggleButton = styled.div`
                ${button};
                color: white;
                border: 1px solid white;
                display: none;
            Severity: Major
            Found in site/demos/gitxplore/src/styles/Button.js and 1 other location - About 1 hr to fix
            site/demos/gitxplore-dark/src/styles/Button.js on lines 14..33

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

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

                renderInfo() {
                    const { title } = this.state;
                    if (title) {
                        return <div className="title-box">{title}</div>;
                    }
            Severity: Major
            Found in site/demos/datalayer/src/index.js and 2 other locations - About 1 hr to fix
            site/demos/polygon/src/index.js on lines 25..31
            site/demos/polyline/src/index.js on lines 25..31

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 56.

            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

                                data={[
                                    { distance: 100, label: 'Under 100 miles' },
                                    { distance: 200, label: 'Under 200 miles' },
                                    { distance: 500, label: 'Under 500 miles' },
                                    { distance: 1000, label: 'Under 1000 miles' },
            Severity: Major
            Found in packages/maps/examples/GeoDistanceDropdown/src/index.js and 1 other location - About 1 hr to fix
            site/demos/meetup/src/components/App.js on lines 43..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 56.

            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

                                    data={[
                                        { distance: 10, label: 'Within 10 miles' },
                                        { distance: 100, label: 'Within 100 miles' },
                                        { distance: 250, label: 'Within 250 miles' },
                                        { distance: 500, label: 'Within 500 miles' },
            Severity: Major
            Found in site/demos/meetup/src/components/App.js and 1 other location - About 1 hr to fix
            packages/maps/examples/GeoDistanceDropdown/src/index.js on lines 30..35

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

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

                    setPage(page) {
                        // pageClick will be called everytime a pagination button is clicked
                        if (page !== this.$currentPage) {
                            this.$emit('pageClick', page + 1);
                            const value = this.$props.size * page;
            Severity: Minor
            Found in packages/vue/src/components/result/ReactiveList.jsx - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                      if (this.state.currentDate) {
                          markedDates = {
                              [this.state.currentDate.start.dateString]: {
                                  startingDay: true,
                                  color:
              Severity: Major
              Found in packages/native/src/components/date/DateRange.js - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                        if (this.state.currentDate) {
                            markedDates = {
                                [this.state.currentDate.dateString]: {
                                    startingDay: true,
                                    endingDay: true,
                Severity: Major
                Found in packages/native/src/components/date/DatePicker.js - About 1 hr to fix

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

                      hasValidValue(component) {
                          if (!component) return false;
                          if (Array.isArray(component.value)) return !!component.value.length;
                          return !!component.value;
                      }
                  Severity: Major
                  Found in packages/web/src/components/basic/URLParamsProvider.js and 1 other location - About 1 hr to fix
                  packages/vue/src/components/URLParamsProvider.jsx on lines 91..95

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

                  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

                          hasValidValue(component) {
                              if (!component) return false;
                              if (Array.isArray(component.value)) return !!component.value.length;
                              return !!component.value;
                          },
                  Severity: Major
                  Found in packages/vue/src/components/URLParamsProvider.jsx and 1 other location - About 1 hr to fix
                  packages/web/src/components/basic/URLParamsProvider.js on lines 105..109

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

                  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

                          options(newVal) {
                              this.modifiedOptions = newVal[this.$props.dataField]
                                  ? newVal[this.$props.dataField].buckets
                                  : [];
                          },
                  Severity: Major
                  Found in packages/vue/src/components/list/SingleList.jsx and 1 other location - About 1 hr to fix
                  packages/vue/src/components/list/MultiList.jsx on lines 95..99

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

                  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

                          options(newVal) {
                              this.modifiedOptions = newVal[this.$props.dataField]
                                  ? newVal[this.$props.dataField].buckets
                                  : [];
                          },
                  Severity: Major
                  Found in packages/vue/src/components/list/MultiList.jsx and 1 other location - About 1 hr to fix
                  packages/vue/src/components/list/SingleList.jsx on lines 94..98

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

                  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

                                  input: event => {
                                      this.setState({
                                          isOpen: true,
                                          inputValue: event.target.value
                                      });
                  Severity: Major
                  Found in packages/vue/src/components/basic/DownShift.jsx and 1 other location - About 1 hr to fix
                  packages/vue/src/components/basic/DownShift.jsx on lines 237..245

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

                  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