airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 total issues

File slice.py has 319 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/models/slice.py - About 3 hrs to fix

    File CommonParameters.tsx has 319 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 filters has 91 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        const filters: Filters = useMemo(() => {
          const filters_list = [
            {
              Header: t('Name'),
              key: 'search',
      Severity: Major
      Found in superset-frontend/src/pages/DashboardList/index.tsx - About 3 hrs to fix

        Function constructor has 90 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          constructor(props) {
            super(props);
        
            const { dashboardFilters, layout } = props;
        
        

          File tag.py has 316 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/tag.py - About 3 hrs to fix

            File DrillByMenuItems.tsx has 316 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/components/Chart/DrillBy/DrillByMenuItems.tsx - About 3 hrs to fix

              Function CountryMap has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

              function CountryMap(element, props) {
                const {
                  data,
                  width,
                  height,

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

                  def get_time_filter(
                      self,
                      column: str | None = None,
                      default: str | None = None,
                      target_type: str | None = None,
              Severity: Minor
              Found in superset/jinja_context.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 getInitialState has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
              Open

              export default function getInitialState({
                common,
                active_tab: activeTab,
                tab_state_ids: tabStateIds = [],
                databases,
              Severity: Minor
              Found in superset-frontend/src/SqlLab/reducers/getInitialState.ts - 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 types.ts has 314 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import { JsonObject } from '@superset-ui/core';
              import { InputProps } from 'antd/lib/input';
              import { ChangeEvent, EventHandler, FormEvent } from 'react';
              
              /**
              Severity: Minor
              Found in superset-frontend/src/features/databases/types.ts - About 3 hrs to fix

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

                  render() {
                    const {
                      className,
                      data,
                      width,

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

                    render() {
                      const isButtonDisabled = this.isBtnDisabled();
                      const VIEW_INSTRUCTIONS_TEXT = t('view instructions');
                      const datasetHelpText = this.state.canCreateDataset ? (
                        <span data-test="dataset-write">
                  Severity: Major
                  Found in superset-frontend/src/pages/ChartCreation/index.tsx - About 3 hrs to fix

                    File Tab.jsx has 313 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/components/gridComponents/Tab.jsx - About 3 hrs to fix

                      File PropertiesModal.test.tsx has 313 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 utils.ts has 313 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/components/ListView/utils.ts - About 3 hrs to fix

                          actionHandlers has 29 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                            const actionHandlers = {
                              [HYDRATE_DASHBOARD]() {
                                return { ...state, ...action.data.dashboardState };
                              },
                              [UPDATE_CSS]() {
                          Severity: Minor
                          Found in superset-frontend/src/dashboard/reducers/dashboardState.js - About 3 hrs to fix

                            File DatasourceModal.tsx has 312 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/components/Datasource/DatasourceModal.tsx - About 3 hrs to fix

                              Function exports has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              module.exports = async results => {
                                const enrichedRules = {
                                  'react-prefer-function-component/react-prefer-function-component': {
                                    description: 'We prefer function components to class-based components',
                                  },
                              Severity: Major
                              Found in superset-frontend/scripts/eslint-metrics-uploader.js - About 3 hrs to fix

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

                                  render() {
                                    const { isFocused, editorMode } = this.state;
                                
                                    const {
                                      component,

                                  Function options has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const options = useMemo(() => {
                                      if (dashboardId) {
                                        return [
                                          <Option value="dashboard" label={t('dashboard')} key="dashboard">
                                            <Tooltip title={DASHBOARD_ALERT}>{t('Dashboard scheme')}</Tooltip>
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language