airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

Function getCrossFilterDataMask has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    (value: { [key: string]: string }) => {
      const isActiveFilterValue = (key: string, val: DataRecordValue) =>
        !!selectedFilters && selectedFilters[key]?.includes(val);

      if (!value) {

    Function contextmenu has 55 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        contextmenu: async eventParams => {
          if (onContextMenu) {
            eventParams.event.stop();
            const { data, seriesName } = eventParams;
            const drillToDetailFilters: BinaryQueryObjectFilterClause[] = [];

      Function Alert has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function Alert(props: AlertProps) {
        const {
          type = 'info',
          description,
          showIcon = true,
      Severity: Major
      Found in superset-frontend/src/components/Alert/index.tsx - About 2 hrs to fix

        Function renderTable has 55 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          const renderTable = (type: objectType) => {
            const data = objects[type].map((o: TaggedObject) => ({
              [type]: <a href={o.url}>{o.name}</a>,
              modified: moment.utc(o.changed_on).fromNow(),
              tags: o.tags,
        Severity: Major
        Found in superset-frontend/src/features/allEntities/AllEntitiesTable.tsx - About 2 hrs to fix

          File hydrate.js has 258 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/dashboard/actions/hydrate.js - About 2 hrs to fix

            File ScopingModal.test.tsx has 258 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 DatasetList.test.tsx has 257 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/DatasetList/DatasetList.test.tsx - About 2 hrs to fix

                PrestoBaseEngineSpec has 21 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class PrestoBaseEngineSpec(BaseEngineSpec, metaclass=ABCMeta):
                    """
                    A base class that share common functions between Presto and Trino
                    """
                
                
                Severity: Minor
                Found in superset/db_engine_specs/presto.py - About 2 hrs to fix

                  envVarConfigSetter has 21 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                    const envVarConfigSetter: { [envVar: string]: (val: string) => void } = {
                      PORT: val => (config.port = toNumber(val)),
                      LOG_LEVEL: val => (config.logLevel = val),
                      LOG_TO_FILE: val => (config.logToFile = toBoolean(val)),
                      LOG_FILENAME: val => (config.logFilename = val),
                  Severity: Minor
                  Found in superset-websocket/src/config.ts - About 2 hrs to fix

                    Function updateHistory has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      async (
                        formData,
                        datasourceId,
                        datasourceType,
                        isReplace,

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

                        render() {
                          if (this.cachedProps !== this.props) {
                            this.cachedProps = this.props;
                            this.cachedBasePivotSettings = this.getBasePivotSettings();
                          }

                        Function renderPopoverContent has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          renderPopoverContent() {
                            return (
                              <div style={{ width: '300px' }}>
                                <PopoverSection
                                  title={t('Longitude & Latitude columns')}
                        Severity: Major
                        Found in superset-frontend/src/explore/components/controls/SpatialControl.jsx - About 2 hrs to fix

                          Function formatter has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                formatter: (params: any) => {
                                  const xValue: number = richTooltip
                                    ? params[0].value[0]
                                    : params.value[0];
                                  const forecastValue: any[] = richTooltip ? params : [params];

                            Function useDatasetChartRecords has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const useDatasetChartRecords = (datasetId: string) => {
                              const { addDangerToast } = useToasts();
                            
                              // Always filters charts by dataset
                              const baseFilters = useMemo(

                              Function renderModalFooter has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const renderModalFooter = () => {
                                  if (db) {
                                    // if db show back + connect
                                    if (!hasConnectedDb || editNewDb) {
                                      return (
                              Severity: Major
                              Found in superset-frontend/src/features/databases/DatabaseModal/index.tsx - About 2 hrs to fix

                                Function getCrossFiltersConfiguration has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export const getCrossFiltersConfiguration = (
                                  dashboardLayout: DashboardLayout,
                                  metadata: Pick<
                                    DashboardInfo['metadata'],
                                    'chart_configuration' | 'global_chart_configuration'
                                Severity: Major
                                Found in superset-frontend/src/dashboard/util/crossFilters.ts - About 2 hrs to fix

                                  Function refreshHandler has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      (force = false) => {
                                        if (!hasDataset || !formFilter?.dataset?.value) {
                                          forceUpdate();
                                          return;
                                        }

                                    Function AddDataset has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export default function AddDataset() {
                                      const [dataset, setDataset] = useReducer<
                                        Reducer<Partial<DatasetObject> | null, DSReducerActionType>
                                      >(datasetReducer, null);
                                      const [hasColumns, setHasColumns] = useState(false);
                                    Severity: Major
                                    Found in superset-frontend/src/pages/DatasetCreation/index.tsx - About 2 hrs to fix

                                      File update.py has 256 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/commands/database/update.py - About 2 hrs to fix

                                        File PopKPI.tsx has 256 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
                                          Category
                                          Status
                                          Source
                                          Language