airbnb/superset

View on GitHub

Showing 2,345 of 5,983 total issues

File data.ts has 5523 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 data.ts has 3317 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 countries.py has 2485 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/countries.py - About 6 days to fix

        File manager.py has 2230 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/security/manager.py - About 6 days to fix

          File viz.py has 2218 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/viz.py - About 6 days to fix

            Function nvd3Vis has a Cognitive Complexity of 294 (exceeds 5 allowed). Consider refactoring.
            Open

            function nvd3Vis(element, props) {
              const {
                data,
                width: maxWidth,
                height: maxHeight,
            Severity: Minor
            Found in superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js - About 6 days 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 api.py has 2139 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/databases/api.py - About 5 days to fix

              File base.py has 1995 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/db_engine_specs/base.py - About 5 days to fix

                File index.tsx has 1880 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/features/databases/DatabaseModal/index.tsx - About 5 days to fix

                  File helpers.py has 1799 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/models/helpers.py - About 4 days to fix

                    File index.test.tsx has 1783 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/features/databases/DatabaseModal/index.test.tsx - About 4 days to fix

                      File models.py has 1751 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/connectors/sqla/models.py - About 4 days to fix

                        Function get_sqla_query has a Cognitive Complexity of 228 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def get_sqla_query(  # pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements
                                self,
                                apply_fetch_values_predicate: bool = False,
                                columns: Optional[list[Column]] = None,
                                extras: Optional[dict[str, Any]] = None,
                        Severity: Minor
                        Found in superset/models/helpers.py - About 4 days 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 AlertReportModal.tsx has 1544 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/features/alerts/AlertReportModal.tsx - About 4 days to fix

                          Function nvd3Vis has 823 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function nvd3Vis(element, props) {
                            const {
                              data,
                              width: maxWidth,
                              height: maxHeight,
                          Severity: Major
                          Found in superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js - About 4 days to fix

                            File schemas.py has 1469 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/charts/schemas.py - About 3 days to fix

                              File DatasourceEditor.jsx has 1446 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/components/Datasource/DatasourceEditor.jsx - About 3 days to fix

                                Function DatabaseModal has a Cognitive Complexity of 182 (exceeds 5 allowed). Consider refactoring.
                                Open

                                const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
                                  addDangerToast,
                                  addSuccessToast,
                                  onDatabaseAdd,
                                  onHide,
                                Severity: Minor
                                Found in superset-frontend/src/features/databases/DatabaseModal/index.tsx - About 3 days 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 core.py has 1399 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/utils/core.py - About 3 days to fix

                                  Function drawGraph has 739 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const drawGraph = function drawGraph() {
                                      const d3Element = d3.select(element);
                                      d3Element.classed('superset-legacy-chart-nvd3', true);
                                      d3Element.classed(`superset-legacy-chart-nvd3-${kebabCase(vizType)}`, true);
                                      let svg = d3Element.select('svg');
                                  Severity: Major
                                  Found in superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js - About 3 days to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language