appbaseio/reactivesearch

View on GitHub

Showing 1,376 of 1,376 total issues

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

    render() {
        return (
            <ReactiveBase
                app="carstore-dataset"
                credentials="4HWI27QmA:58c731f7-79ab-4f55-a590-7e15c7e36721"
Severity: Minor
Found in packages/web/examples/ReactiveComponent/src/index.js - About 1 hr to fix

    Function getInputEvents has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

            getInputEvents({
                onInput,
                onBlur,
                onFocus,
                onKeyPress,
    Severity: Minor
    Found in packages/vue/src/components/basic/DownShift.jsx - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function render has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

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

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

                                    <div>
                                        <img src="images/tools/ReactiveMaps.svg" alt="Reactivemaps" />
                                        <p className={brand}>
                                            Reactive <span className={boldFont}>Maps</span> for web
                                        </p>
    Severity: Major
    Found in site/src/components/Tools.js and 3 other locations - About 1 hr to fix
    site/src/components/Tools.js on lines 162..170
    site/src/components/Tools.js on lines 177..182
    site/src/components/Tools.js on lines 183..191

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

    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

    const darkInput = ({ theme }) => css`
        background-color: ${theme.colors.backgroundColor};
        color: ${theme.colors.textColor};
        ${dark(theme)};
    
    
    Severity: Major
    Found in packages/web/src/styles/Input.js and 1 other location - About 1 hr to fix
    packages/vue/src/styles/Input.js on lines 26..34

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 70.

    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

    const darkInput = ({ theme }) => css`
        background-color: ${theme.colors.backgroundColor};
        color: ${theme.colors.textColor};
        ${dark(theme)};
    
    
    Severity: Major
    Found in packages/vue/src/styles/Input.js and 1 other location - About 1 hr to fix
    packages/web/src/styles/Input.js on lines 26..34

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 70.

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

                                    <div>
                                        <img
                                            src="images/tools/Search.svg"
                                            alt="Reactivesearch for web"
                                        />
    Severity: Major
    Found in site/src/components/Tools.js and 3 other locations - About 1 hr to fix
    site/src/components/Tools.js on lines 171..176
    site/src/components/Tools.js on lines 177..182
    site/src/components/Tools.js on lines 183..191

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

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

                                    <div>
                                        <img
                                            src="images/tools/ReactiveNative.svg"
                                            alt="Reactivesearch for mobile"
                                        />
    Severity: Major
    Found in site/src/components/Tools.js and 3 other locations - About 1 hr to fix
    site/src/components/Tools.js on lines 162..170
    site/src/components/Tools.js on lines 171..176
    site/src/components/Tools.js on lines 177..182

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

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

                                    <div>
                                        <img src="images/tools/Vue.svg" alt="Reactivesearch for vue" />
                                        <p className={brand}>
                                            Reactive <span className={boldFont}>Search</span> for vue
                                        </p>
    Severity: Major
    Found in site/src/components/Tools.js and 3 other locations - About 1 hr to fix
    site/src/components/Tools.js on lines 162..170
    site/src/components/Tools.js on lines 171..176
    site/src/components/Tools.js on lines 183..191

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

    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

    const Navbar = styled.nav`
        background: ${theme.colors.secondaryColor};
        left: 0;
        width: 400px;
        padding: 1rem;
    Severity: Major
    Found in site/demos/gitxplore/src/styles/Navbar.js and 1 other location - About 1 hr to fix
    site/demos/gitxplore-dark/src/styles/Navbar.js on lines 21..36

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

    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

    const Navbar = styled.nav`
        background: ${theme.colors.secondaryColor};
        left: 0;
        width: 400px;
        padding: 1rem;
    Severity: Major
    Found in site/demos/gitxplore-dark/src/styles/Navbar.js and 1 other location - About 1 hr to fix
    site/demos/gitxplore/src/styles/Navbar.js on lines 21..36

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

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

    ) => component => {
        const mapState = normalizeMapState(_mapState);
    
        return {
            name: `connect-${component.name}`,
    Severity: Minor
    Found in packages/vue/src/utils/connector.js - About 1 hr to fix

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

          render() {
              return (
                  <ReactiveBase
                      app="meetup_app"
                      credentials="lW70IgSjr:87c5ae16-73fb-4559-a29e-0a02760d2181"
      Severity: Minor
      Found in packages/web/examples/MultiDataList/src/index.js - About 1 hr to fix

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

            render() {
                return (
                    <Slider primary style={this.props.style} className={this.props.className}>
                        {this.props.title && (
                            <Title className={getClassName(this.props.innerClass, 'title') || null}>
        Severity: Minor
        Found in packages/maps/src/components/basic/GeoDistanceSlider.js - About 1 hr to fix

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

              render() {
                  return (
                      <ReactiveBase
                          app="meetup_app"
                          credentials="lW70IgSjr:87c5ae16-73fb-4559-a29e-0a02760d2181"
          Severity: Minor
          Found in packages/web/examples/SingleDataList/src/index.js - About 1 hr to fix

            Function render has 42 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/DataController/src/index.js - About 1 hr to fix

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

                  componentWillReceiveProps(nextProps) {
                      checkPropChange(this.props.react, nextProps.react, () => this.setReact(nextProps));
                      checkPropChange(this.props.options, nextProps.options, () => {
                          const { showLoadMore, dataField } = nextProps;
                          const { options } = this.state;
              Severity: Minor
              Found in packages/web/src/components/list/SingleDropdownList.js - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                        if (
                            this.state.searchAsMove !== nextState.searchAsMove
                            || this.state.markerOnTop !== nextState.markerOnTop
                            || this.props.showMapStyles !== nextProps.showMapStyles
                            || this.props.autoCenter !== nextProps.autoCenter
                Severity: Critical
                Found in packages/maps/src/components/result/ReactiveMap.js - About 1 hr to fix

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

                          props.updateQuery({
                              componentId: props.componentId,
                              query: query(this.coordinates, distance, props),
                              value,
                              label: props.filterLabel,
                  Severity: Major
                  Found in packages/maps/src/components/basic/GeoDistanceDropdown.js and 1 other location - About 1 hr to fix
                  packages/maps/src/components/basic/GeoDistanceSlider.js on lines 287..294

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

                  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

                      handleDrag = (values) => {
                          if (this.props.onDrag) {
                              const { min, max, values: currentValue } = values;
                              this.props.onDrag(currentValue, [min, max]);
                          }
                  Severity: Major
                  Found in packages/web/src/components/range/RangeSlider.js and 1 other location - About 1 hr to fix
                  packages/web/src/components/range/DynamicRangeSlider.js on lines 287..292

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

                  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