dustin-H/bauhaus-ui

View on GitHub

Showing 60 of 123 total issues

Avoid too many return statements within this function.
Open

      return newState
Severity: Major
Found in src/reducers/router.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return dispatch(changePage(pageTypes.LOGIN))
    Severity: Major
    Found in src/actions/auth.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return newState
      Severity: Major
      Found in src/reducers/search.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                  return dispatch(loginError())
        Severity: Major
        Found in src/actions/auth.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                    return dispatch(loginError())
          Severity: Major
          Found in src/actions/auth.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return newState
            Severity: Major
            Found in src/reducers/search.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return newState
              Severity: Major
              Found in src/reducers/search.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                      return newState
                Severity: Major
                Found in src/reducers/config.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                            return dispatch(loginError())
                  Severity: Major
                  Found in src/actions/auth.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                          return newState
                    Severity: Major
                    Found in src/reducers/auth.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                            return newState
                      Severity: Major
                      Found in src/reducers/auth.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                              return newState
                        Severity: Major
                        Found in src/reducers/config.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                return newState
                          Severity: Major
                          Found in src/reducers/config.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                  return newState
                            Severity: Major
                            Found in src/reducers/config.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                          return dispatch(changePage(pageTypes.LOGIN))
                              Severity: Major
                              Found in src/actions/auth.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                      return newState
                                Severity: Major
                                Found in src/reducers/config.js - About 30 mins to fix

                                  Function auth has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  export default function auth(state = initialState, action) {
                                    switch (action.type) {
                                      case types.AUTH_LOGIN_SUBMIT:
                                        var newState = Object.assign({}, state)
                                        newState.loginLoading = true
                                  Severity: Minor
                                  Found in src/reducers/auth.js - About 25 mins 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 config has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  export default function config(state = initialState, action) {
                                    switch (action.type) {
                                      case types.CONFIG_SET_PAGE:
                                        if (pageTypes[action.page] != null) {
                                          var newState = Object.assign({}, state)
                                  Severity: Minor
                                  Found in src/reducers/config.js - About 25 mins 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 left has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      left: (props, state, context) => {
                                        if (props.state.sideBar.show === true && props.state.config.singlePageView !== true) {
                                          if (props.state.responsive.device.tablet === true) {
                                            return props.state.sideBar.smallSize
                                          }
                                  Severity: Minor
                                  Found in src/components/App/style.js - About 25 mins 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 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                    render() {
                                      const {bauhaus} = this.props
                                      var props = Object.assign({}, this.props)
                                      props.bauhaus._state = props.bauhaus._contentState[this._bauhausId] || {}
                                      props.bauhaus._setState = this.createSetStateAction(this._bauhausId)
                                  Severity: Minor
                                  Found in src/components/Loader.js - About 25 mins 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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language