airbnb/caravel

View on GitHub

Showing 5,976 of 5,976 total issues

File data.ts has 907 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 907 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 AsyncSelect.test.tsx has 874 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/Select/AsyncSelect.test.tsx - About 2 days to fix

        Function ExploreViewContainer has 424 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function ExploreViewContainer(props) {
          const dynamicPluginContext = usePluginContext();
          const dynamicPlugin = dynamicPluginContext.dynamicPlugins[props.vizType];
          const isDynamicPluginLoading = dynamicPlugin && dynamicPlugin.mounting;
          const wasDynamicPluginLoading = usePrevious(isDynamicPluginLoading);

          Function PivotTableChart has 406 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            File index.tsx has 837 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/components/SqlEditor/index.tsx - About 2 days to fix

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              test('Renders only an overflow tag if dropdown is open in oneLine mode', async () => {
                render(
                  <Select
                    {...defaultProps}
                    value={[OPTIONS[0], OPTIONS[1], OPTIONS[2]]}
              Severity: Major
              Found in superset-frontend/src/components/Select/Select.test.tsx and 1 other location - About 1 day to fix
              superset-frontend/src/components/Select/AsyncSelect.test.tsx on lines 792..823

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 352.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              test('Renders only an overflow tag if dropdown is open in oneLine mode', async () => {
                render(
                  <AsyncSelect
                    {...defaultProps}
                    value={[OPTIONS[0], OPTIONS[1], OPTIONS[2]]}
              Severity: Major
              Found in superset-frontend/src/components/Select/AsyncSelect.test.tsx and 1 other location - About 1 day to fix
              superset-frontend/src/components/Select/Select.test.tsx on lines 785..816

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 352.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              File index.tsx has 824 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/DatasetList/index.tsx - About 1 day to fix

                File index.tsx has 821 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/ChartList/index.tsx - About 1 day to fix

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      {
                        group: ['James'],
                        values: [
                          {
                            x: -157766400000.0,
                  superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-plugin-chart-paired-t-test/data.ts on lines 136..248

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 349.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      {
                        group: ['David'],
                        values: [
                          {
                            x: -157766400000.0,
                  superset-frontend/packages/superset-ui-demo/storybook/stories/plugins/legacy-plugin-chart-paired-t-test/data.ts on lines 249..361

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 349.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Function AsyncSelect has a Cognitive Complexity of 97 (exceeds 5 allowed). Consider refactoring.
                  Open

                    (
                      {
                        allowClear,
                        allowNewOptions = false,
                        ariaLabel,
                  Severity: Minor
                  Found in superset-frontend/src/components/Select/AsyncSelect.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

                  File TableRenderers.jsx has 813 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 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
                                Severity
                                Category
                                Status
                                Source
                                Language