appbaseio/reactivesearch

View on GitHub

Showing 334 of 1,376 total issues

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

    componentWillReceiveProps(nextProps) {
        this.currentSelectedState = nextProps.selectedValues;
        if (!isEqual(this.props.selectedValues, nextProps.selectedValues)) {
            const searchParams = this.props.getSearchParams
              ? this.props.getSearchParams()
Severity: Major
Found in packages/web/src/components/basic/URLParamsProvider.js - About 2 hrs to fix

    Function mounted has 55 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        mounted() {
            this.addComponent(this.internalComponent);
            this.addComponent(this.$props.componentId);
    
            if (this.$props.stream) {
    Severity: Major
    Found in packages/vue/src/components/result/ReactiveList.jsx - About 2 hrs to fix

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

          render() {
              const {
                  className, style, themePreset, ...rest
              } = this.props;
              return (
      Severity: Major
      Found in packages/web/src/components/range/RangeInput.js - About 2 hrs to fix

        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 { isLastBucket } = this.$data;
                  let selectAll = [];
                  const renderListItemCalc
          Severity: Major
          Found in packages/vue/src/components/list/SingleDropdownList.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 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 53 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: Major
                Found in packages/web/src/components/range/RangeSlider.js - About 2 hrs to fix

                  Function setValue has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                  Open

                          setValue(value, isDefaultValue = false, props = this.$props) {
                              // ignore state updates when component is locked
                              if (props.beforeValueChange && this.locked) {
                                  return;
                              }
                  Severity: Minor
                  Found in packages/vue/src/components/list/MultiDropdownList.jsx - About 2 hrs 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 16 (exceeds 5 allowed). Consider refactoring.
                  Open

                      render() {
                          let style = {};
                  
                          if (this.props.showIcon) {
                              if (this.props.iconPosition === 'left') {
                  Severity: Minor
                  Found in packages/native/src/components/search/DataSearch.js - About 2 hrs 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 componentDidMount has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      componentDidMount() {
                          this.props.addComponent(this.internalComponent);
                          this.props.addComponent(this.props.componentId);
                  
                          if (this.props.stream) {
                  Severity: Major
                  Found in packages/native/src/components/result/ReactiveList.js - About 2 hrs to fix

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

                        render() {
                            const { showLoadMore, loadMoreLabel } = this.props;
                            const { isLastBucket } = this.state;
                            let selectAll = [];
                    
                    
                    Severity: Major
                    Found in packages/web/src/components/list/MultiDropdownList.js - About 2 hrs to fix

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

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

                        Function render has 50 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/CustomSelectedFilters/src/index.js - About 2 hrs to fix

                          Function componentWillReceiveProps has 49 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/MultiDropdownList.js - About 1 hr to fix

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

                                render() {
                                    return (
                                        <DateContainer
                                            showBorder={!this.props.showClear}
                                            style={this.props.style}
                            Severity: Minor
                            Found in packages/web/src/components/date/DatePicker.js - About 1 hr to fix

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

                                  render() {
                                      const {
                                          items,
                                          selectedItem,
                                          placeholder,
                              Severity: Minor
                              Found in packages/vue/src/components/shared/DropDown.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 47 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  render() {
                                      const tooltipTrigger
                                          = this.$props.tooltipTrigger === 'none' ? false : this.$props.tooltipTrigger;
                                      return (
                                          <Container class={this.$props.className}>
                              Severity: Minor
                              Found in packages/vue/src/components/range/RangeSlider.jsx - About 1 hr to fix

                                Function renderAsList has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        renderAsList({ item, triggerClickAnalytics }) {
                                            const onData = this.$props.onData || this.$scopedSlots.onData;
                                            const result = onData(item);
                                            if (result) {
                                                return (
                                Severity: Minor
                                Found in packages/vue/src/components/result/ResultList.jsx - About 1 hr to fix

                                  Function shouldQuery has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  DataSearch.shouldQuery = (value, dataFields, props) => {
                                      const fields = dataFields.map(
                                          (field, index) =>
                                              `${field}${
                                                  Array.isArray(props.fieldWeights) && props.fieldWeights[index]
                                  Severity: Minor
                                  Found in packages/vue/src/components/search/DataSearch.jsx - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language