airbnb/caravel

View on GitHub

Showing 2,424 of 6,113 total issues

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

export default function EchartsTimeseries({
  formData,
  height,
  width,
  echartOptions,

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 chartAction.js has 534 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/Chart/chartAction.js - About 1 day to fix

      File SliceHeaderControls.test.tsx has 534 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 hive.py has 533 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/db_engine_specs/hive.py - About 1 day to fix

          Function get_executor has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
          Open

          def get_executor(
              executor_types: list[ExecutorType],
              model: Dashboard | ReportSchedule | Slice,
              current_user: str | None = None,
          ) -> tuple[ExecutorType, str]:
          Severity: Minor
          Found in superset/tasks/utils.py - 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 NotificationMethod.tsx has 529 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 Menu.test.tsx has 526 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/Menu.test.tsx - About 1 day to fix

              Function DataTable has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
              Open

              export default typedMemo(function DataTable<D extends object>({
                tableClassName,
                columns,
                data,
                serverPaginationData,

              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 212 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function transformProps(
                chartProps: EchartsFunnelChartProps,
              ): FunnelChartTransformedProps {
                const {
                  formData,

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

                export default function transformProps(
                  chartProps: BigNumberWithTrendlineChartProps,
                ): BigNumberVizProps {
                  const {
                    width,

                  Function getDropPosition has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
                  Open

                  export default function getDropPosition(monitor, Component) {
                    const {
                      depth: componentDepth,
                      parentComponent,
                      component,
                  Severity: Minor
                  Found in superset-frontend/src/dashboard/util/getDropPosition.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 transformSeries has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
                  Open

                  export function transformSeries(
                    series: SeriesOption,
                    colorScale: CategoricalColorScale,
                    colorScaleKey: string,
                    opts: {

                  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 styles.ts has 516 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/DatabaseModal/styles.ts - About 1 day to fix

                    Function PopKPI has 209 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export default function PopKPI(props: PopKPIProps) {
                      const {
                        height,
                        width,
                        bigNumber,

                      File utils.tsx has 514 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/views/CRUD/utils.tsx - About 1 day to fix

                        SqlaTable has 58 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class SqlaTable(
                            Model,
                            BaseDatasource,
                            ExploreMixin,
                        ):  # pylint: disable=too-many-public-methods
                        Severity: Major
                        Found in superset/connectors/sqla/models.py - About 1 day to fix

                          Function postprocess_columns has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def postprocess_columns(session: Session) -> None:
                              """
                              At this step, we will
                                - Add engine specific quotes to `expression` of physical columns
                                - Tuck some extra metadata to `extra_json`

                          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 deck.py has 510 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/deck.py - About 1 day to fix
                            Severity
                            Category
                            Status
                            Source
                            Language