airbnb/caravel

View on GitHub

Showing 2,372 of 6,033 total issues

Function redraw has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring.
Open

  redraw({ width, height, ctx, isDragging, project }) {
    const {
      aggregation,
      compositeOperation,
      dotRadius,

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

File base_api.py has 565 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
Severity: Major
Found in superset/views/base_api.py - About 1 day to fix

    File transformProps.ts has 565 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Licensed to the Apache Software Foundation (ASF) under one
     * or more contributor license agreements.  See the NOTICE file
     * distributed with this work for additional information
     * regarding copyright ownership.  The ASF licenses this file
    Severity: Major
    Found in superset-frontend/plugins/plugin-chart-table/src/transformProps.ts - About 1 day to fix

      Function Icicle has 236 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function Icicle(element, props) {
        const {
          width,
          height,
          data,

        File saveModalActions.test.ts has 560 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * Licensed to the Apache Software Foundation (ASF) under one
         * or more contributor license agreements.  See the NOTICE file
         * distributed with this work for additional information
         * regarding copyright ownership.  The ASF licenses this file
        Severity: Major
        Found in superset-frontend/src/explore/actions/saveModalActions.test.ts - About 1 day to fix

          Function upgrade has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
          Open

          def upgrade():
              bind = op.get_bind()
              session = db.Session(bind=bind)
          
              dashboards = session.query(Dashboard).all()

          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 transformProps has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
          Open

          export default function transformProps(
            chartProps: EchartsTimeseriesChartProps,
          ): TimeseriesChartTransformedProps {
            const {
              width,

          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

          File AsyncSelect.tsx has 554 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * Licensed to the Apache Software Foundation (ASF) under one
           * or more contributor license agreements.  See the NOTICE file
           * distributed with this work for additional information
           * regarding copyright ownership.  The ASF licenses this file
          Severity: Major
          Found in superset-frontend/src/components/Select/AsyncSelect.tsx - About 1 day to fix

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

              render() {
                const {
                  adhocMetric: propsAdhocMetric,
                  savedMetric: propsSavedMetric,
                  columns,

              Function saveDashboardRequest has 232 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function saveDashboardRequest(data, id, saveType) {
                return (dispatch, getState) => {
                  dispatch({ type: UPDATE_COMPONENTS_PARENTS_LIST });
                  dispatch(saveDashboardStarted());
              
              
              Severity: Major
              Found in superset-frontend/src/dashboard/actions/dashboardState.js - About 1 day to fix

                File transformers.ts has 549 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * Licensed to the Apache Software Foundation (ASF) under one
                 * or more contributor license agreements.  See the NOTICE file
                 * distributed with this work for additional information
                 * regarding copyright ownership.  The ASF licenses this file

                  File AlertReportModal.test.tsx has 546 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /**
                   * Licensed to the Apache Software Foundation (ASF) under one
                   * or more contributor license agreements.  See the NOTICE file
                   * distributed with this work for additional information
                   * regarding copyright ownership.  The ASF licenses this file
                  Severity: Major
                  Found in superset-frontend/src/features/alerts/AlertReportModal.test.tsx - About 1 day to fix

                    Function sqlLabReducer has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
                    Open

                    export default function sqlLabReducer(state = {}, action) {
                      const actionHandlers = {
                        [actions.ADD_QUERY_EDITOR]() {
                          const mergeUnsavedState = alterInArr(
                            state,
                    Severity: Minor
                    Found in superset-frontend/src/SqlLab/reducers/sqlLab.js - About 1 day 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 PluginFilterSelect has 227 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export default function PluginFilterSelect(props: PluginFilterSelectProps) {
                      const {
                        coltypeMap,
                        data,
                        filterState,

                      Function transformProps has 225 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function transformProps(
                        chartProps: EchartsSunburstChartProps,
                      ): SunburstTransformedProps {
                        const {
                          formData,

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

                          render() {
                            const {
                              showChangeDatasourceModal,
                              showEditDatasourceModal,
                              showSaveDatasetModal,

                          Function upgrade has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def upgrade():
                              bind = op.get_bind()
                              session = db.Session(bind=bind)
                          
                              for slc in session.query(Slice).all():

                          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 FiltersConfigModal has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function FiltersConfigModal({
                            isOpen,
                            initialFilterId,
                            createNewOnOpen,
                            onSave,

                          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

                          File tabbed_dashboard.py has 535 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          # Licensed to the Apache Software Foundation (ASF) under one
                          # or more contributor license agreements.  See the NOTICE file
                          # distributed with this work for additional information
                          # regarding copyright ownership.  The ASF licenses this file
                          # to you under the Apache License, Version 2.0 (the
                          Severity: Major
                          Found in superset/examples/tabbed_dashboard.py - About 1 day to fix

                            File __init__.py has 535 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            # Licensed to the Apache Software Foundation (ASF) under one
                            # or more contributor license agreements.  See the NOTICE file
                            # distributed with this work for additional information
                            # regarding copyright ownership.  The ASF licenses this file
                            # to you under the Apache License, Version 2.0 (the
                            Severity: Major
                            Found in superset/initialization/__init__.py - About 1 day to fix
                              Severity
                              Category
                              Status
                              Source
                              Language