airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

File payload.js has 361 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 transformProps.ts has 361 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 Query.ts has 361 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* eslint camelcase: 0 */
      /**
       * 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: Minor
      Found in superset-frontend/packages/superset-ui-core/src/query/types/Query.ts - About 4 hrs to fix

        File sharedControls.tsx has 360 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /* eslint-disable camelcase */
        /**
         * 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

          File schemas.py has 359 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/reports/schemas.py - About 4 hrs to fix

            File metadb.py has 359 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/extensions/metadb.py - About 4 hrs to fix

              Function getValidation has 115 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  (database: Partial<DatabaseObject> | null, onCreate = false) => {
                    if (database?.parameters?.ssh) {
                      // TODO: /validate_parameters/ and related utils should support ssh tunnel
                      setValidationErrors(null);
                      return [];
              Severity: Major
              Found in superset-frontend/src/views/CRUD/hooks.ts - About 4 hrs to fix

                File index.tsx has 358 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/PropertiesModal/index.tsx - About 4 hrs to fix

                  Function data_for_slices has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def data_for_slices(  # pylint: disable=too-many-locals
                          self, slices: list[Slice]
                      ) -> dict[str, Any]:
                          """
                          The representation of the datasource containing only the required data
                  Severity: Minor
                  Found in superset/connectors/sqla/models.py - About 4 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 get_df_payload has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def get_df_payload(  # pylint: disable=too-many-statements
                          self, query_obj: QueryObjectDict | None = None, **kwargs: Any
                      ) -> dict[str, Any]:
                          """Handles caching around the df payload retrieval"""
                          if not query_obj:
                  Severity: Minor
                  Found in superset/viz.py - About 4 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 processColumns has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                  const processColumns = memoizeOne(function processColumns(
                    props: TableChartProps,
                  ) {
                    const {
                      datasource: { columnFormats, currencyFormats, verboseMap },
                  Severity: Minor
                  Found in superset-frontend/plugins/plugin-chart-table/src/transformProps.ts - About 4 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 CssTemplateModal has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                  const CssTemplateModal: FunctionComponent<CssTemplateModalProps> = ({
                    addDangerToast,
                    onCssTemplateAdd,
                    onHide,
                    show,
                  Severity: Minor
                  Found in superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx - About 4 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 parseDttmToDate has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                  export const parseDttmToDate = (
                    dttm: string,
                    isEndDate = false,
                    computingShifts = false,
                  ) => {

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

                    render() {
                      const { data, metric, groups } = this.props;
                      const { control, liftValues, pValues } = this.state;
                  
                      if (!Array.isArray(groups) || groups.length === 0) {

                    Function testEchart has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const testEchart = (
                      vizType: string,
                      chartName: string,
                      drillClickCoordinates: [[number, number], [number, number]],
                      furtherDrillDimension = 'name',
                    Severity: Major
                    Found in superset-frontend/cypress-base/cypress/e2e/dashboard/drillby.test.ts - About 4 hrs to fix

                      File e2e.ts has 356 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/cypress-base/cypress/support/e2e.ts - About 4 hrs to fix

                        File index.tsx has 355 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 parseDttmToDate has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const parseDttmToDate = (
                            dttm: string,
                            isEndDate = false,
                            computingShifts = false,
                          ) => {

                            File dashboard.py has 354 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/daos/dashboard.py - About 4 hrs to fix

                              File index.tsx has 354 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /* eslint-disable @typescript-eslint/naming-convention */
                              /**
                               * 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
                                Category
                                Status
                                Source
                                Language