appbaseio/reactivesearch

View on GitHub

Showing 1,376 of 1,376 total issues

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    className: 'result-list-container',
    from: 0,
Severity: Major
Found in packages/web/examples/ssr/pages/textfield.js and 7 other locations - About 2 hrs to fix
packages/web/examples/ssr/pages/categorysearch.js on lines 27..37
packages/web/examples/ssr/pages/datasearch.js on lines 22..32
packages/web/examples/ssr/pages/multidropdownlist.js on lines 27..37
packages/web/examples/ssr/pages/multilist.js on lines 22..32
packages/web/examples/ssr/pages/numberbox.js on lines 27..37
packages/web/examples/ssr/pages/singledropdownlist.js on lines 27..37
packages/web/examples/ssr/pages/singlelist.js on lines 22..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 79.

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    className: 'result-list-container',
    from: 0,
Severity: Major
Found in packages/web/examples/ssr/pages/categorysearch.js and 7 other locations - About 2 hrs to fix
packages/web/examples/ssr/pages/datasearch.js on lines 22..32
packages/web/examples/ssr/pages/multidropdownlist.js on lines 27..37
packages/web/examples/ssr/pages/multilist.js on lines 22..32
packages/web/examples/ssr/pages/numberbox.js on lines 27..37
packages/web/examples/ssr/pages/singledropdownlist.js on lines 27..37
packages/web/examples/ssr/pages/singlelist.js on lines 22..32
packages/web/examples/ssr/pages/textfield.js on lines 21..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 79.

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    className: 'result-list-container',
    from: 0,
Severity: Major
Found in packages/web/examples/ssr/pages/datasearch.js and 7 other locations - About 2 hrs to fix
packages/web/examples/ssr/pages/categorysearch.js on lines 27..37
packages/web/examples/ssr/pages/multidropdownlist.js on lines 27..37
packages/web/examples/ssr/pages/multilist.js on lines 22..32
packages/web/examples/ssr/pages/numberbox.js on lines 27..37
packages/web/examples/ssr/pages/singledropdownlist.js on lines 27..37
packages/web/examples/ssr/pages/singlelist.js on lines 22..32
packages/web/examples/ssr/pages/textfield.js on lines 21..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 79.

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

        if (this.defaultQuery) {
            this.props.updateQuery(
                {
                    componentId: this.internalComponent,
                    query,
Severity: Major
Found in packages/native/src/components/result/ReactiveList.js and 1 other location - About 2 hrs to fix
packages/web/src/components/result/ReactiveList.js on lines 96..112

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

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    className: 'result-list-container',
    from: 0,
Severity: Major
Found in packages/web/examples/ssr/pages/numberbox.js and 7 other locations - About 2 hrs to fix
packages/web/examples/ssr/pages/categorysearch.js on lines 27..37
packages/web/examples/ssr/pages/datasearch.js on lines 22..32
packages/web/examples/ssr/pages/multidropdownlist.js on lines 27..37
packages/web/examples/ssr/pages/multilist.js on lines 22..32
packages/web/examples/ssr/pages/singledropdownlist.js on lines 27..37
packages/web/examples/ssr/pages/singlelist.js on lines 22..32
packages/web/examples/ssr/pages/textfield.js on lines 21..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 79.

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    className: 'result-list-container',
    from: 0,
Severity: Major
Found in packages/web/examples/ssr/pages/singlelist.js and 7 other locations - About 2 hrs to fix
packages/web/examples/ssr/pages/categorysearch.js on lines 27..37
packages/web/examples/ssr/pages/datasearch.js on lines 22..32
packages/web/examples/ssr/pages/multidropdownlist.js on lines 27..37
packages/web/examples/ssr/pages/multilist.js on lines 22..32
packages/web/examples/ssr/pages/numberbox.js on lines 27..37
packages/web/examples/ssr/pages/singledropdownlist.js on lines 27..37
packages/web/examples/ssr/pages/textfield.js on lines 21..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 79.

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

const reactiveListProps = {
    componentId: 'SearchResult',
    dataField: 'original_title.raw',
    className: 'result-list-container',
    from: 0,
Severity: Major
Found in packages/web/examples/ssr/pages/singledropdownlist.js and 7 other locations - About 2 hrs to fix
packages/web/examples/ssr/pages/categorysearch.js on lines 27..37
packages/web/examples/ssr/pages/datasearch.js on lines 22..32
packages/web/examples/ssr/pages/multidropdownlist.js on lines 27..37
packages/web/examples/ssr/pages/multilist.js on lines 22..32
packages/web/examples/ssr/pages/numberbox.js on lines 27..37
packages/web/examples/ssr/pages/singlelist.js on lines 22..32
packages/web/examples/ssr/pages/textfield.js on lines 21..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 79.

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

        if (this.defaultQuery) {
            this.props.updateQuery(
                {
                    componentId: this.internalComponent,
                    query,
Severity: Major
Found in packages/web/src/components/result/ReactiveList.js and 1 other location - About 2 hrs to fix
packages/native/src/components/result/ReactiveList.js on lines 97..113

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

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

GeoDistanceSlider has 21 functions (exceeds 20 allowed). Consider refactoring.
Open

class GeoDistanceSlider extends Component {
    constructor(props) {
        super(props);

        this.state = {
Severity: Minor
Found in packages/maps/src/components/basic/GeoDistanceSlider.js - About 2 hrs to fix

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

        render() {
            const { showLoadMore, loadMoreLabel, renderListItem } = this.$props;
            const renderListItemCalc
                = this.$scopedSlots.renderListItem || renderListItem;
            const { isLastBucket } = this.$data;
    Severity: Major
    Found in packages/vue/src/components/list/MultiDropdownList.jsx - About 2 hrs to fix

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

          render() {
              let selectAll = [];
      
              if (this.state.options.length === 0) {
                  return null;
      Severity: Major
      Found in packages/native/src/components/list/SingleDropdownList.js - About 2 hrs to fix

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

            render() {
                const { showLoadMore, loadMoreLabel, renderListItem } = this.$props;
                const { isLastBucket } = this.$data;
                let selectAll = [];
                const renderListItemCalc
        Severity: Major
        Found in packages/vue/src/components/list/SingleDropdownList.jsx - About 2 hrs to fix

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

                  checkPropChange(this.props.options, nextProps.options, () => {
                      this.setState({
                          options: nextProps.options[nextProps.dataField]
                              ? nextProps.options[nextProps.dataField].buckets
                              : [],
          Severity: Major
          Found in packages/native/src/components/list/SingleDropdownList.js and 2 other locations - About 2 hrs to fix
          packages/native/src/components/list/MultiDropdownList.js on lines 61..67
          packages/web/src/components/basic/TagCloud.js on lines 63..69

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

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

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

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

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

          Refactorings

          Further Reading

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

                          {this.props.onAllData
                              ? this.props.onAllData(
                                  parseHits(this.props.hits),
                                  parseHits(this.props.streamHits),
                                  this.loadMore,
          Severity: Major
          Found in packages/maps/src/components/result/ReactiveMap.js and 1 other location - About 2 hrs to fix
          packages/maps-native/src/components/maps/ReactiveMap.js on lines 641..649

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

          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

                  checkPropChange(this.props.options, nextProps.options, () => {
                      this.setState({
                          options: nextProps.options[nextProps.dataField]
                              ? nextProps.options[nextProps.dataField].buckets
                              : [],
          Severity: Major
          Found in packages/native/src/components/list/MultiDropdownList.js and 2 other locations - About 2 hrs to fix
          packages/native/src/components/list/SingleDropdownList.js on lines 55..61
          packages/web/src/components/basic/TagCloud.js on lines 63..69

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

          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

                  if (this.props.defaultPage >= 0) {
                      currentPage = this.props.defaultPage;
                  } else if (this.props.currentPage) {
                      currentPage = Math.max(this.props.currentPage - 1, 0);
                  }
          Severity: Major
          Found in packages/native/src/components/result/ReactiveList.js and 1 other location - About 2 hrs to fix
          packages/web/src/components/result/ReactiveList.js on lines 35..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 78.

          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

                  checkPropChange(this.props.options, nextProps.options, () => {
                      this.setState({
                          options: nextProps.options[nextProps.dataField]
                              ? nextProps.options[nextProps.dataField].buckets
                              : [],
          Severity: Major
          Found in packages/web/src/components/basic/TagCloud.js and 2 other locations - About 2 hrs to fix
          packages/native/src/components/list/MultiDropdownList.js on lines 61..67
          packages/native/src/components/list/SingleDropdownList.js on lines 55..61

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

          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

                  if (this.props.defaultPage >= 0) {
                      currentPage = this.props.defaultPage;
                  } else if (this.props.currentPage) {
                      currentPage = Math.max(this.props.currentPage - 1, 0);
                  }
          Severity: Major
          Found in packages/web/src/components/result/ReactiveList.js and 1 other location - About 2 hrs to fix
          packages/native/src/components/result/ReactiveList.js on lines 33..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 78.

          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

                  return this.props.onAllData
                      ? this.props.onAllData(
                          parseHits(this.props.hits),
                          parseHits(this.props.streamHits),
                          this.loadMore,
          Severity: Major
          Found in packages/maps-native/src/components/maps/ReactiveMap.js and 1 other location - About 2 hrs to fix
          packages/maps/src/components/result/ReactiveMap.js on lines 955..963

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

          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.showIcon && this.props.iconPosition === 'left' ? (
                              <Icon
                                  name="search"
                                  style={{
                                      fontSize: 22,
          Severity: Major
          Found in packages/native/src/components/search/DataSearch.js and 1 other location - About 2 hrs to fix
          packages/native/src/components/search/DataSearch.js on lines 403..412

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

          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