airbnb/superset

View on GitHub

Showing 2,345 of 5,983 total issues

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

    File api.py has 707 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/tags/api.py - About 1 day to fix

      Function RowLevelSecurityModal has 324 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function RowLevelSecurityModal(props: RowLevelSecurityModalProps) {
        const { rule, addDangerToast, addSuccessToast, onHide, show } = props;
      
        const [currentRule, setCurrentRule] = useState<RLSObject>({
          ...DEAFULT_RULE,
      Severity: Major
      Found in superset-frontend/src/features/rls/RowLevelSecurityModal.tsx - About 1 day to fix

        Function TagList has 324 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function TagList(props: TagListProps) {
          const { addDangerToast, addSuccessToast, user } = props;
          const { userId } = user;
        
          const initialFilters = useMemo(
        Severity: Major
        Found in superset-frontend/src/pages/Tags/index.tsx - About 1 day to fix

          File index.tsx has 704 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 docs/src/pages/index.tsx - About 1 day to fix

            Function useExploreAdditionalActionsMenu has 320 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const useExploreAdditionalActionsMenu = (
              latestQueryFormData,
              canDownloadCSV,
              slice,
              onOpenInEditor,

              Function Heatmap has 319 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function Heatmap(element, props) {
                const {
                  data,
                  width,
                  height,
              Severity: Major
              Found in superset-frontend/plugins/legacy-plugin-chart-heatmap/src/Heatmap.js - About 1 day to fix

                Function ResultSet has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring.
                Open

                const ResultSet = ({
                  cache = false,
                  csv = true,
                  database = {},
                  displayLimit,
                Severity: Minor
                Found in superset-frontend/src/SqlLab/components/ResultSet/index.tsx - About 1 day 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 RowLevelSecurityList has 313 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function RowLevelSecurityList(props: RLSProps) {
                  const { addDangerToast, addSuccessToast, user } = props;
                  const [ruleModalOpen, setRuleModalOpen] = useState<boolean>(false);
                  const [currentRule, setCurrentRule] = useState(null);
                
                
                Severity: Major
                Found in superset-frontend/src/pages/RowLevelSecurityList/index.tsx - About 1 day to fix

                  File index.tsx has 683 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/dashboard/components/PropertiesModal/index.tsx - About 1 day to fix

                    File data.ts has 682 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 raise_for_access has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring.
                      Open

                          def raise_for_access(
                              # pylint: disable=too-many-arguments,too-many-branches,too-many-locals,too-many-statements
                              self,
                              dashboard: Optional["Dashboard"] = None,
                              chart: Optional["Slice"] = None,
                      Severity: Minor
                      Found in superset/security/manager.py - About 1 day 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 transformProps.ts has 675 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.jsx has 673 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/dashboard/components/Header/index.jsx - About 1 day to fix

                          File FilterScopeSelector.jsx has 662 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 execute.py has 660 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/commands/report/execute.py - About 1 day to fix

                              Function DashboardBuilder has 295 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const DashboardBuilder: FC<DashboardBuilderProps> = () => {
                                const dispatch = useDispatch();
                                const uiConfig = useUiConfig();
                                const theme = useTheme();
                              
                              

                                Function transformProps has 294 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export default function transformProps(
                                  chartProps: EchartsWaterfallChartProps,
                                ): WaterfallChartTransformedProps {
                                  const {
                                    width,

                                  File directories.ts has 656 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/cypress-base/cypress/support/directories.ts - About 1 day to fix

                                    File TableChart.tsx has 654 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/plugins/plugin-chart-table/src/TableChart.tsx - About 1 day to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language