airbnb/superset

View on GitHub

Showing 2,301 of 5,879 total issues

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

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

    Function TableChart has 481 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function TableChart<D extends DataRecord = DataRecord>(
      props: TableChartTransformedProps<D> & {
        sticky?: DataTableProps<D>['sticky'];
      },
    ) {
    Severity: Major
    Found in superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx - About 2 days to fix

      Function ControlPanelsContainer has 478 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const ControlPanelsContainer = (props: ControlPanelsContainerProps) => {
        const { colors } = useTheme();
        const pluginContext = useContext(PluginContext);
      
        const prevState = usePrevious(props.exploreState);
      Severity: Major
      Found in superset-frontend/src/explore/components/ControlPanelsContainer.tsx - About 2 days to fix

        File index.tsx has 960 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/databases/UploadDataModel/index.tsx - About 2 days to fix

          File Select.test.tsx has 943 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/Select.test.tsx - About 2 days to fix

            File data.ts has 930 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 AnnotationLayer.jsx has 911 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 core.py has 908 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/models/core.py - About 2 days to fix

                  File data.ts has 907 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 data.ts has 907 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 data.ts has 907 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 AsyncSelect.test.tsx has 875 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.test.tsx - About 2 days to fix

                          File sqlLab.test.js has 868 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/SqlLab/actions/sqlLab.test.js - About 2 days to fix

                            Function ExploreViewContainer has 418 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function ExploreViewContainer(props) {
                              const dynamicPluginContext = usePluginContext();
                              const dynamicPlugin = dynamicPluginContext.dynamicPlugins[props.vizType];
                              const isDynamicPluginLoading = dynamicPlugin && dynamicPlugin.mounting;
                              const wasDynamicPluginLoading = usePrevious(isDynamicPluginLoading);

                              Function PivotTableChart has 406 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export default function PivotTableChart(props: PivotTableProps) {
                                const {
                                  data,
                                  height,
                                  width,

                                File index.tsx has 836 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/SqlLab/components/SqlEditor/index.tsx - About 2 days to fix

                                  File index.tsx has 829 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/pages/DatasetList/index.tsx - About 1 day to fix

                                    File index.tsx has 821 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/pages/ChartList/index.tsx - About 1 day to fix

                                      Function AsyncSelect has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                        (
                                          {
                                            allowClear,
                                            allowNewOptions = false,
                                            ariaLabel,
                                      Severity: Minor
                                      Found in superset-frontend/src/components/Select/AsyncSelect.tsx - 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

                                      File TableRenderers.jsx has 813 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
                                        Category
                                        Status
                                        Source
                                        Language