appbaseio/reactivesearch

View on GitHub

Showing 1,376 of 1,376 total issues

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

ReactiveBase.propTypes = {
    app: types.stringRequired,
    children: types.children,
    credentials: types.string,
    headers: types.headers,
Severity: Major
Found in packages/web/src/components/basic/ReactiveBase.js and 1 other location - About 6 hrs to fix
packages/web/src/components/shared/Dropdown.js on lines 248..266

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

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 DateRange.js has 436 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/date/DateRange.js - About 6 hrs to fix

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

        props: {
            beforeValueChange: types.func,
            className: VueTypes.string.def(''),
            componentId: types.stringRequired,
            customQuery: types.func,
    Severity: Major
    Found in packages/vue/src/components/range/MultiRange.jsx and 1 other location - About 6 hrs to fix
    packages/vue/src/components/range/SingleRange.jsx on lines 22..37

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

    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

        props: {
            beforeValueChange: types.func,
            className: VueTypes.string.def(''),
            componentId: types.stringRequired,
            customQuery: types.func,
    Severity: Major
    Found in packages/vue/src/components/range/SingleRange.jsx and 1 other location - About 6 hrs to fix
    packages/vue/src/components/range/MultiRange.jsx on lines 24..39

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

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

        render() {
            const {
                items,
                selectedItem,
                placeholder,
    Severity: Major
    Found in packages/vue/src/components/shared/DropDown.jsx - About 6 hrs to fix

      File SingleList.js has 434 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/SingleList.js - About 6 hrs to fix

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

            render() {
                return (
                    <ReactiveBase
                        app="good-books-ds"
                        credentials="nY6NNTZZ6:27b76b9f-18ea-456c-bc5e-3a5263ebc63d"
        Severity: Major
        Found in site/demos/goodbooks/src/App.js - About 6 hrs to fix

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

              updateQuery = (value, props) => {
                  const query = props.customQuery || DynamicRangeSlider.defaultQuery;
                  const {
                      showFilter,
                      range: { start, end },
          Severity: Major
          Found in packages/web/src/components/range/DynamicRangeSlider.js and 1 other location - About 6 hrs to fix
          packages/web/src/components/range/RangeSlider.js on lines 248..266

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

          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

              updateQuery = (value, props) => {
                  const query = props.customQuery || RangeSlider.defaultQuery;
                  const {
                      showFilter,
                      range: { start, end },
          Severity: Major
          Found in packages/web/src/components/range/RangeSlider.js and 1 other location - About 6 hrs to fix
          packages/web/src/components/range/DynamicRangeSlider.js on lines 294..313

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

          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

                          {this.props.pagination
                          && (this.props.paginationAt === 'top' || this.props.paginationAt === 'both')
                              ? (
                                  <Pagination
                                      pages={this.props.pages}
          Severity: Major
          Found in packages/web/src/components/result/ReactiveList.js and 1 other location - About 6 hrs to fix
          packages/web/src/components/result/ReactiveList.js on lines 589..600

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

          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

                          {this.props.pagination
                          && (this.props.paginationAt === 'bottom' || this.props.paginationAt === 'both')
                              ? (
                                  <Pagination
                                      pages={this.props.pages}
          Severity: Major
          Found in packages/web/src/components/result/ReactiveList.js and 1 other location - About 6 hrs to fix
          packages/web/src/components/result/ReactiveList.js on lines 547..558

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

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

              render() {
                  let markedDates = {};
                  const current = this.state.currentDate
                      ? this.state.currentDate.dateString
                      : this.props.initialMonth || Date();
          Severity: Major
          Found in packages/native/src/components/date/DatePicker.js - About 6 hrs to fix

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

                        if (
                            !value
                            || (typeof value === 'string' && value.trim() === '')
                            || (Array.isArray(value) && value.length === 0)
                        ) {
            Severity: Major
            Found in packages/vue/src/components/URLParamsProvider.jsx and 1 other location - About 6 hrs to fix
            packages/web/src/components/basic/URLParamsProvider.js on lines 128..141

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

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

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

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

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

            Refactorings

            Further Reading

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

                    if (
                        !value
                        || (typeof value === 'string' && value.trim() === '')
                        || (Array.isArray(value) && value.length === 0)
                    ) {
            Severity: Major
            Found in packages/web/src/components/basic/URLParamsProvider.js and 1 other location - About 6 hrs to fix
            packages/vue/src/components/URLParamsProvider.jsx on lines 111..125

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

            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 421 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/MultiDropdownList.js - About 6 hrs to fix

              File MultiDropdownList.jsx has 420 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import { Actions, helper } from '@appbaseio/reactivecore';
              import VueTypes from 'vue-types';
              import types from '../../utils/vueTypes';
              import { getAggsQuery, getCompositeAggsQuery } from './utils';
              import Title from '../../styles/Title';
              Severity: Minor
              Found in packages/vue/src/components/list/MultiDropdownList.jsx - About 6 hrs to fix

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

                export const queries = Object.keys(breakpoints).reduce((acc, label) => {
                    const accumulator = acc;
                    if (typeof breakpoints[label] === 'string') {
                        accumulator[label] = (...args) =>
                            css`
                Severity: Major
                Found in site/demos/gitxplore/src/styles/mediaQueries.js and 4 other locations - About 6 hrs to fix
                site/demos/ecommerce/src/styles/mediaQueries.js on lines 14..33
                site/demos/gitxplore-dark/src/styles/mediaQueries.js on lines 13..32
                site/demos/producthunt/src/styles/mediaQueries.js on lines 13..32
                site/demos/technews/src/styles/mediaQueries.js on lines 12..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 156.

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

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

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

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

                Refactorings

                Further Reading

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

                export const queries = Object.keys(breakpoints).reduce((acc, label) => {
                    const accumulator = acc;
                    if (typeof breakpoints[label] === 'string') {
                        accumulator[label] = (...args) =>
                            css`
                Severity: Major
                Found in site/demos/producthunt/src/styles/mediaQueries.js and 4 other locations - About 6 hrs to fix
                site/demos/ecommerce/src/styles/mediaQueries.js on lines 14..33
                site/demos/gitxplore-dark/src/styles/mediaQueries.js on lines 13..32
                site/demos/gitxplore/src/styles/mediaQueries.js on lines 13..32
                site/demos/technews/src/styles/mediaQueries.js on lines 12..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 156.

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

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

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

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

                Refactorings

                Further Reading

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

                export const queries = Object.keys(breakpoints).reduce((acc, label) => {
                    const accumulator = acc;
                    if (typeof breakpoints[label] === 'string') {
                        accumulator[label] = (...args) =>
                            css`
                Severity: Major
                Found in site/demos/ecommerce/src/styles/mediaQueries.js and 4 other locations - About 6 hrs to fix
                site/demos/gitxplore-dark/src/styles/mediaQueries.js on lines 13..32
                site/demos/gitxplore/src/styles/mediaQueries.js on lines 13..32
                site/demos/producthunt/src/styles/mediaQueries.js on lines 13..32
                site/demos/technews/src/styles/mediaQueries.js on lines 12..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 156.

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

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

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

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

                Refactorings

                Further Reading

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

                export const queries = Object.keys(breakpoints).reduce((acc, label) => {
                    const accumulator = acc;
                    if (typeof breakpoints[label] === 'string') {
                        accumulator[label] = (...args) =>
                            css`
                Severity: Major
                Found in site/demos/technews/src/styles/mediaQueries.js and 4 other locations - About 6 hrs to fix
                site/demos/ecommerce/src/styles/mediaQueries.js on lines 14..33
                site/demos/gitxplore-dark/src/styles/mediaQueries.js on lines 13..32
                site/demos/gitxplore/src/styles/mediaQueries.js on lines 13..32
                site/demos/producthunt/src/styles/mediaQueries.js on lines 13..32

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

                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