airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

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

  render() {
    const value = this.props.value || this.props.default;
    const type = value.type || controlTypes.fixed;
    const columns = this.props.datasource
      ? this.props.datasource.columns

    File index.tsx has 325 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: Minor
    Found in superset-frontend/src/explore/components/DataTableControl/index.tsx - About 3 hrs to fix

      File index.tsx has 325 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: Minor
      Found in superset-frontend/src/pages/ChartCreation/index.tsx - About 3 hrs to fix

        File FilterScope.test.tsx has 324 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 constructor has 94 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            constructor() {
              const experimentalPlugins = isFeatureEnabled(
                FeatureFlag.ChartPluginsExperimental,
              )
                ? [
          Severity: Major
          Found in superset-frontend/src/visualizations/presets/MainPreset.js - About 3 hrs to fix

            Function get_form_data has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
            Open

            def get_form_data(
                slice_id: Optional[int] = None,
                use_slice_data: bool = False,
                initial_form_data: Optional[dict[str, Any]] = None,
            ) -> tuple[dict[str, Any], Optional[Slice]]:
            Severity: Minor
            Found in superset/views/utils.py - About 3 hrs 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 filter_values_handler has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
            Open

                def filter_values_handler(  # pylint: disable=too-many-arguments
                    values: FilterValues | None,
                    operator: str,
                    target_generic_type: utils.GenericDataType,
                    target_native_type: str | None = None,
            Severity: Minor
            Found in superset/connectors/sqla/models.py - About 3 hrs 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 filter_values_handler has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
            Open

                def filter_values_handler(  # pylint: disable=too-many-arguments
                    values: Optional[FilterValues],
                    operator: str,
                    target_generic_type: utils.GenericDataType,
                    target_native_type: Optional[str] = None,
            Severity: Minor
            Found in superset/models/helpers.py - About 3 hrs 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 extract_table_references has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
            Open

            def extract_table_references(
                sql_text: str, sqla_dialect: str, show_warning: bool = True
            ) -> set[Table]:
                """
                Return all the dependencies from a SQL sql_text.
            Severity: Minor
            Found in superset/sql_parse.py - About 3 hrs 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 QueryList has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
            Open

            function QueryList({ addDangerToast }: QueryListProps) {
              const {
                state: { loading, resourceCount: queryCount, resourceCollection: queries },
                fetchData,
              } = useListViewResource<QueryObject>(
            Severity: Minor
            Found in superset-frontend/src/pages/QueryHistoryList/index.tsx - About 3 hrs 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 BigNumberViz.tsx has 322 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 saveOrOverwrite has 93 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                async saveOrOverwrite(gotodash: boolean) {
                  this.setState({ isLoading: true });
              
                  //  Create or retrieve dashboard
                  type DashboardGetResponse = {
              Severity: Major
              Found in superset-frontend/src/explore/components/SaveModal.tsx - About 3 hrs to fix

                Function PluginFilterTimegrain has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function PluginFilterTimegrain(
                  props: PluginFilterTimeGrainProps,
                ) {
                  const {
                    data,

                  File api.py has 321 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: Minor
                  Found in superset/annotation_layers/api.py - About 3 hrs to fix

                    File MixedSeries.stories.tsx has 321 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 gsheets.py has 320 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: Minor
                      Found in superset/db_engine_specs/gsheets.py - About 3 hrs to fix

                        Function ColorSchemeLabel has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function ColorSchemeLabel(props: ColorSchemeLabelProps) {
                          const { id, label, colors } = props;
                          const [showTooltip, setShowTooltip] = useState<boolean>(false);
                          const labelNameRef = useRef<HTMLElement>(null);
                          const labelsColorRef = useRef<HTMLElement>(null);

                          Function importResource has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              (
                                bundle: File,
                                databasePasswords: Record<string, string> = {},
                                sshTunnelPasswords: Record<string, string> = {},
                                sshTunnelPrivateKey: Record<string, string> = {},
                          Severity: Major
                          Found in superset-frontend/src/views/CRUD/hooks.ts - About 3 hrs to fix

                            File RightMenu.test.tsx has 320 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: Minor
                            Found in superset-frontend/src/features/home/RightMenu.test.tsx - About 3 hrs to fix

                              SupersetAppInitializer has 30 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class SupersetAppInitializer:  # pylint: disable=too-many-public-methods
                                  def __init__(self, app: SupersetApp) -> None:
                                      super().__init__()
                              
                                      self.superset_app = app
                              Severity: Minor
                              Found in superset/initialization/__init__.py - About 3 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language