airbnb/caravel

View on GitHub

Showing 2,372 of 6,033 total issues

File ExtraOptions.tsx has 606 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 drillby.test.ts has 602 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/cypress-base/cypress/e2e/dashboard/drillby.test.ts - About 1 day to fix

      File DashboardBuilder.tsx has 601 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

        Function dbReducer has 259 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function dbReducer(
          state: Partial<DatabaseObject> | null,
          action: DBReducerActionType,
        ): Partial<DatabaseObject> | null {
          const trimmedState = {
        Severity: Major
        Found in superset-frontend/src/features/databases/DatabaseModal/index.tsx - About 1 day to fix

          Function DndMetricSelect has 256 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const DndMetricSelect = (props: any) => {
            const { onChange, multi, datasource, savedMetrics } = props;
          
            const extra = useMemo<{ disallow_adhoc_metrics?: boolean }>(() => {
              let extra = {};

            File index.tsx has 593 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/DatabaseList/index.tsx - About 1 day to fix

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

              export default function transformProps(
                chartProps: EchartsGaugeChartProps,
              ): GaugeChartTransformedProps {
                const {
                  width,

                File index.tsx has 584 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/SavedQueryList/index.tsx - About 1 day to fix

                  Function exploreReducer has 249 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function exploreReducer(state = {}, action) {
                    const actionHandlers = {
                      [DYNAMIC_PLUGIN_CONTROLS_READY]() {
                        return {
                          ...state,
                  Severity: Major
                  Found in superset-frontend/src/explore/reducers/exploreReducer.js - About 1 day to fix

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

                    const transformProps = (
                      chartProps: TableChartProps,
                    ): TableChartTransformedProps => {
                      const {
                        height,
                    Severity: Major
                    Found in superset-frontend/plugins/plugin-chart-table/src/transformProps.ts - About 1 day to fix

                      Function DateFilterLabel has 249 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function DateFilterLabel(props: DateFilterControlProps) {
                        const {
                          onChange,
                          onOpenPopover = noOp,
                          onClosePopover = noOp,

                        Function Rose has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function Rose(element, props) {
                          const {
                            data,
                            width,
                            height,
                        Severity: Minor
                        Found in superset-frontend/plugins/legacy-plugin-chart-rose/src/Rose.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

                        File RightMenu.tsx has 579 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/home/RightMenu.tsx - About 1 day to fix

                          File FiltersConfigModal.tsx has 578 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 Select.tsx has 577 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.tsx - About 1 day to fix

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

                              export default function transformProps(
                                chartProps: EchartsBoxPlotChartProps,
                              ): BoxPlotChartTransformedProps {
                                const {
                                  width,

                                File index.tsx has 574 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/AlertReportList/index.tsx - About 1 day to fix

                                  Function AdhocFilterEditPopoverSimpleTabContent has 244 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const AdhocFilterEditPopoverSimpleTabContent: FC<Props> = props => {
                                    const {
                                      onSubjectChange,
                                      onOperatorChange,
                                      isOperatorRelevant,

                                    File series.ts has 573 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    /* eslint-disable no-underscore-dangle */
                                    /**
                                     * 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
                                    Severity: Major
                                    Found in superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts - About 1 day to fix

                                      File Rose.js has 570 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/legacy-plugin-chart-rose/src/Rose.js - About 1 day to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language