airbnb/caravel

View on GitHub

Showing 2,441 of 6,157 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 2243 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 2145 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 2056 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 1901 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 models.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/connectors/sqla/models.py - About 4 days to fix

                    File index.test.tsx has 1795 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 helpers.py has 1780 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

                        Function get_sqla_query has a Cognitive Complexity of 234 (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 1667 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

                          File api.py has 1623 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/dashboards/api.py - About 4 days to fix

                            Function nvd3Vis has 825 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

                                Function TableChart has 774 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export default function TableChart<D extends DataRecord = DataRecord>(
                                  props: TableChartTransformedProps<D> & {
                                    sticky?: DataTableProps<D>['sticky'];
                                  },
                                ) {
                                Severity: Major
                                Found in superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx - 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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language