airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

Function DownloadScreenshot has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export default function DownloadScreenshot({
  text,
  logEvent,
  dashboardId,
  format,

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

export default function extractQueryFields(
  formData: FormDataResidual,
  aliases?: QueryFieldAliases,
): QueryFields {
  const queryFieldAliases: QueryFieldAliases = {

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

  renderChart(width: number, height: number) {
    const {
      id,
      className,
      chartType,

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

export function normalizeTimeColumn(
  formData: QueryFormData,
  queryObject: QueryObject,
): QueryObject {
  // The formData should be "raw form_data" -- the snake_case version of formData rather than camelCase.

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

export const getComparisonFilters = (
  formData: QueryFormData,
  extraFormData: any,
): AdhocFilter[] => {
  const timeFilterIndex: number =

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 main has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

def main(
Severity: Major
Found in scripts/build_docker.py - About 50 mins to fix

    Function get_docker_command has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def get_docker_command(
    Severity: Major
    Found in scripts/build_docker.py - About 50 mins to fix

      Function get_time_filter has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def get_time_filter(  # pylint: disable=too-many-arguments
      Severity: Major
      Found in superset/models/helpers.py - About 50 mins to fix

        Function get_samples has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def get_samples(  # pylint: disable=too-many-arguments
        Severity: Major
        Found in superset/views/datasource/utils.py - About 50 mins to fix

          Function select_star has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def select_star(  # pylint: disable=too-many-arguments
          Severity: Major
          Found in superset/models/core.py - About 50 mins to fix

            Function filter_values_handler has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def filter_values_handler(  # pylint: disable=too-many-arguments
            Severity: Major
            Found in superset/connectors/sqla/models.py - About 50 mins to fix

              Function compare has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def compare(  # pylint: disable=too-many-arguments
              Severity: Major
              Found in superset/utils/pandas_postprocessing/compare.py - About 50 mins to fix

                Function log_with_context has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def log_with_context(  # pylint: disable=too-many-locals,too-many-arguments
                Severity: Major
                Found in superset/utils/log.py - About 50 mins to fix

                  Function compute_and_cache has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def compute_and_cache(  # pylint: disable=too-many-arguments
                  Severity: Major
                  Found in superset/utils/screenshots.py - About 50 mins to fix

                    Function _partition_query has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def _partition_query(  # pylint: disable=too-many-arguments,too-many-locals,unused-argument
                    Severity: Major
                    Found in superset/db_engine_specs/presto.py - About 50 mins to fix

                      Function set_query_result has 7 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def set_query_result(
                      Severity: Major
                      Found in superset/common/utils/query_cache_manager.py - About 50 mins to fix

                        Function _partition_query has 7 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def _partition_query(  # pylint: disable=too-many-arguments
                        Severity: Major
                        Found in superset/db_engine_specs/hive.py - About 50 mins to fix

                          Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def __init__(  # pylint: disable=too-many-arguments
                          Severity: Major
                          Found in superset/jinja_context.py - About 50 mins to fix

                            Function load_configs has 7 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def load_configs(
                            Severity: Major
                            Found in superset/commands/importers/v1/utils.py - About 50 mins to fix

                              Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def __init__(
                              Severity: Major
                              Found in superset/jinja_context.py - About 50 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language