appbaseio/reactivesearch

View on GitHub

Showing 1,376 of 1,376 total issues

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

                    <div
                        class={`${this.$props.listClass} ${getClassName(
                            this.$props.innerClass,
                            'list',
                        )}`}
Severity: Minor
Found in packages/vue/src/components/result/ReactiveList.jsx and 1 other location - About 35 mins to fix
packages/web/src/components/result/ReactiveList.js on lines 565..574

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

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

    {
        featureType: 'administrative.locality',
        elementType: 'all',
        stylers: [{ hue: '#2c2e33' }, { saturation: 7 }, { lightness: 19 }, { visibility: 'on' }],
    },
packages/maps/src/components/result/addons/styles/LightMonochrome.js on lines 63..67

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

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

        } else if (this.props.defaultSelected) {
            startDate = this.props.defaultSelected.start;
            endDate = this.props.defaultSelected.end || null;
        }
Severity: Minor
Found in packages/native/src/components/date/DateRange.js and 1 other location - About 35 mins to fix
packages/native/src/components/date/DateRange.js on lines 45..51

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

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

                        <li
                            key={selectAllLabel}
                            className={`${
                                this.state.currentValue === selectAllLabel ? 'active' : ''
                            }`}
Severity: Minor
Found in packages/web/src/components/list/SingleList.js and 2 other locations - About 35 mins to fix
packages/vue/src/components/list/SingleList.jsx on lines 141..167
packages/web/src/components/list/SingleDataList.js on lines 267..288

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

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

                        <li
                            key={selectAllLabel}
                            className={`${
                                this.state.currentValue === selectAllLabel ? 'active' : ''
                            }`}
Severity: Minor
Found in packages/web/src/components/list/SingleDataList.js and 2 other locations - About 35 mins to fix
packages/vue/src/components/list/SingleList.jsx on lines 141..167
packages/web/src/components/list/SingleList.js on lines 299..321

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

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

                    <div
                        className={`${this.props.listClass} ${getClassName(
                            this.props.innerClass,
                            'list',
                        )}`}
Severity: Minor
Found in packages/web/src/components/result/ReactiveList.js and 1 other location - About 35 mins to fix
packages/vue/src/components/result/ReactiveList.jsx on lines 337..350

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

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

Avoid too many return statements within this function.
Open

    return true;
Severity: Major
Found in packages/vue/src/utils/shallowEqual.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return null;
    Severity: Major
    Found in packages/vue/src/components/list/SingleList.jsx - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return `${interval} minutes`;
      Severity: Major
      Found in site/demos/technews/src/components/Results.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return value;
        Severity: Major
        Found in packages/vue/src/components/shared/DropDown.jsx - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return `${Math.floor(seconds)} seconds`;
          Severity: Major
          Found in site/demos/technews/src/components/Results.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return value;
            Severity: Major
            Found in packages/web/src/components/shared/Dropdown.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return value;
              Severity: Major
              Found in packages/web/src/components/basic/URLParamsProvider.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return this.getDefaultCenter();
                Severity: Major
                Found in packages/maps/src/components/result/ReactiveMap.js - About 30 mins to fix

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

                      handleInputChange = (e) => {
                          const { value } = e.target;
                          this.setState({
                              searchTerm: value,
                          });
                  Severity: Major
                  Found in packages/web/src/components/list/MultiDataList.js and 4 other locations - About 30 mins to fix
                  packages/web/src/components/shared/Dropdown.js on lines 67..72
                  packages/web/src/components/list/MultiList.js on lines 328..333
                  packages/web/src/components/list/SingleDataList.js on lines 220..225
                  packages/web/src/components/list/SingleList.js on lines 235..240

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

                  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

                      handleInputChange = (e) => {
                          const { value } = e.target;
                          this.setState({
                              searchTerm: value,
                          });
                  Severity: Major
                  Found in packages/web/src/components/list/SingleList.js and 4 other locations - About 30 mins to fix
                  packages/web/src/components/shared/Dropdown.js on lines 67..72
                  packages/web/src/components/list/MultiDataList.js on lines 302..307
                  packages/web/src/components/list/MultiList.js on lines 328..333
                  packages/web/src/components/list/SingleDataList.js on lines 220..225

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

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

                      static generateQueryOptions(props, after) {
                          const queryOptions = getQueryOptions(props);
                          return props.showLoadMore
                              ? getCompositeAggsQuery(queryOptions, props, after)
                              : getAggsQuery(queryOptions, props);
                  Severity: Major
                  Found in packages/web/src/components/list/SingleList.js and 3 other locations - About 30 mins to fix
                  packages/web/src/components/list/MultiDropdownList.js on lines 298..303
                  packages/web/src/components/list/MultiList.js on lines 306..311
                  packages/web/src/components/list/SingleDropdownList.js on lines 203..208

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

                  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

                      handleInputChange = (e) => {
                          const { value } = e.target;
                          this.setState({
                              searchTerm: value,
                          });
                  Severity: Major
                  Found in packages/web/src/components/list/MultiList.js and 4 other locations - About 30 mins to fix
                  packages/web/src/components/shared/Dropdown.js on lines 67..72
                  packages/web/src/components/list/MultiDataList.js on lines 302..307
                  packages/web/src/components/list/SingleDataList.js on lines 220..225
                  packages/web/src/components/list/SingleList.js on lines 235..240

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

                  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

                      handleInputChange = (e) => {
                          const { value } = e.target;
                          this.setState({
                              searchTerm: value,
                          });
                  Severity: Major
                  Found in packages/web/src/components/shared/Dropdown.js and 4 other locations - About 30 mins to fix
                  packages/web/src/components/list/MultiDataList.js on lines 302..307
                  packages/web/src/components/list/MultiList.js on lines 328..333
                  packages/web/src/components/list/SingleDataList.js on lines 220..225
                  packages/web/src/components/list/SingleList.js on lines 235..240

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

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

                      static generateQueryOptions(props, after) {
                          const queryOptions = getQueryOptions(props);
                          return props.showLoadMore
                              ? getCompositeAggsQuery(queryOptions, props, after)
                              : getAggsQuery(queryOptions, props);
                  Severity: Major
                  Found in packages/web/src/components/list/SingleDropdownList.js and 3 other locations - About 30 mins to fix
                  packages/web/src/components/list/MultiDropdownList.js on lines 298..303
                  packages/web/src/components/list/MultiList.js on lines 306..311
                  packages/web/src/components/list/SingleList.js on lines 213..218

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

                  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