airbnb/caravel

View on GitHub

Showing 2,347 of 5,976 total issues

Function SliceHeaderControls has 382 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const SliceHeaderControls = (props: SliceHeaderControlsPropsWithRouter) => {
  const [dropdownIsOpen, setDropdownIsOpen] = useState(false);
  const [tableModalIsOpen, setTableModalIsOpen] = useState(false);
  const [drillModalIsOpen, setDrillModalIsOpen] = useState(false);
  const [selectedKeys, setSelectedKeys] = useState<string[]>([]);

    File utilities.js has 798 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 index.tsx has 797 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 core.py has 789 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/views/core.py - About 1 day to fix

          File birth_names.py has 788 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/birth_names.py - About 1 day to fix

            File hooks.ts has 783 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/hooks.ts - About 1 day to fix

              Function PivotTableChart has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring.
              Open

              export default function PivotTableChart(props: PivotTableProps) {
                const {
                  data,
                  height,
                  width,

              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 index.tsx has 777 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/pages/DashboardList/index.tsx - About 1 day to fix

                File nativeFilters.test.ts has 766 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 VizTypeGallery has 359 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function VizTypeGallery(props: VizTypeGalleryProps) {
                    const { selectedViz, onChange, onDoubleClick, className, denyList } = props;
                    const { mountedPluginMetadata } = usePluginContext();
                    const searchInputRef = useRef<HTMLInputElement>();
                    const [searchInputValue, setSearchInputValue] = useState('');

                    SupersetSecurityManager has 94 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class SupersetSecurityManager(  # pylint: disable=too-many-public-methods
                        SecurityManager
                    ):
                        userstatschartview = None
                        READ_ONLY_MODEL_VIEWS = {"Database", "DynamicPlugin"}
                    Severity: Major
                    Found in superset/security/manager.py - About 1 day to fix

                      Function DndFilterSelect has 355 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const DndFilterSelect = (props: DndFilterSelectProps) => {
                        const {
                          datasource,
                          onChange = () => {},
                          name: controlName,

                        File data.ts has 752 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 2022-04-01_14-38_a9422eeaae74_new_dataset_models_take_2.py has 750 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

                            File UploadDataModal.test.tsx has 747 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

                              BaseEngineSpec has 91 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class BaseEngineSpec:  # pylint: disable=too-many-public-methods
                                  """Abstract class for database engine specific configurations
                              
                                  Attributes:
                                      allows_alias_to_source_column: Whether the engine is able to pick the
                              Severity: Major
                              Found in superset/db_engine_specs/base.py - About 1 day to fix

                                File ControlPanelsContainer.tsx has 730 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/explore/components/ControlPanelsContainer.tsx - About 1 day to fix

                                  File index.jsx has 721 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 VizTypeGallery.tsx has 719 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 fixtures.ts has 708 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/SqlLab/fixtures.ts - About 1 day to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language